fix(orchestration): local workflow proxy (#9664)

This commit is contained in:
Carlos R. L. Rodrigues authored and GitHub committed 2024-10-18 13:30:16 +00:00
1 parent d77d184729
commit d3c1580c06
1 file changed
+2 -7
@@ -107,15 +107,10 @@ export class LocalWorkflow {
return resolved return resolved
} }
const wrappableMethods = Object.getOwnPropertyNames(resolved).filter( const nonWrappable = Object.getOwnPropertyNames(resolved)
(key) => key !== "constructor"
)
return new Proxy(resolved, { return new Proxy(resolved, {
get: function (target, prop) { get: function (target, prop) {
const shouldWrap = const shouldWrap = !nonWrappable.includes(prop as string)
wrappableMethods.includes(prop as string) &&
typeof target[prop] === "function"
if (!shouldWrap) { if (!shouldWrap) {
return target[prop] return target[prop]