From d3c1580c06e18babbd19106e3fbc9fb28e153b39 Mon Sep 17 00:00:00 2001 From: "Carlos R. L. Rodrigues" <37986729+carlos-r-l-rodrigues@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:30:16 -0300 Subject: [PATCH] fix(orchestration): local workflow proxy (#9664) --- .../core/orchestration/src/workflow/local-workflow.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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]