Give module context initialization access to the global context

master
Sven Slootweg 4 months ago
parent d2a45fadf7
commit d7368f175c

@ -147,7 +147,8 @@ module.exports = function (modules) {
if (!cache.has(moduleID)) {
cache.set(moduleID, {
... baseContext,
... contextFactories.get(moduleID)()
// NOTE: Module context initialization gets access to the baseContext, for user-level overrides (eg. passing in transaction objects for a query)
... contextFactories.get(moduleID)(baseContext)
});
}

Loading…
Cancel
Save