chore(orchestration): modules method context (#9669)
** What ** * Test to check if the MedusaContext is being injected when calling a Module's method
This commit is contained in:
committed by
GitHub
parent
8209d936a0
commit
6fa98b6a4d
@@ -107,12 +107,9 @@ export class LocalWorkflow {
|
||||
return resolved
|
||||
}
|
||||
|
||||
const nonWrappable = Object.getOwnPropertyNames(resolved)
|
||||
return new Proxy(resolved, {
|
||||
get: function (target, prop) {
|
||||
const shouldWrap = !nonWrappable.includes(prop as string)
|
||||
|
||||
if (!shouldWrap) {
|
||||
if (typeof target[prop] !== "function") {
|
||||
return target[prop]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user