diff --git a/packages/core/orchestration/src/workflow/local-workflow.ts b/packages/core/orchestration/src/workflow/local-workflow.ts index 41b93d3db2..5a03f96eda 100644 --- a/packages/core/orchestration/src/workflow/local-workflow.ts +++ b/packages/core/orchestration/src/workflow/local-workflow.ts @@ -107,15 +107,10 @@ export class LocalWorkflow { return resolved } - const wrappableMethods = Object.getOwnPropertyNames(resolved).filter( - (key) => key !== "constructor" - ) - + const nonWrappable = Object.getOwnPropertyNames(resolved) return new Proxy(resolved, { get: function (target, prop) { - const shouldWrap = - wrappableMethods.includes(prop as string) && - typeof target[prop] === "function" + const shouldWrap = !nonWrappable.includes(prop as string) if (!shouldWrap) { return target[prop]