From 8aa94fc21f4c702a639ad76ec9f0a83434f58385 Mon Sep 17 00:00:00 2001 From: Milorad Filipovic Date: Tue, 17 Sep 2024 11:04:20 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Updating=20expression=20resolving?= =?UTF-8?q?=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/composables/useWorkflowHelpers.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/composables/useWorkflowHelpers.ts b/packages/editor-ui/src/composables/useWorkflowHelpers.ts index 21b2056d570b0..10892ae53e4d2 100644 --- a/packages/editor-ui/src/composables/useWorkflowHelpers.ts +++ b/packages/editor-ui/src/composables/useWorkflowHelpers.ts @@ -712,7 +712,20 @@ export function useWorkflowHelpers(options: { router: ReturnType[2] = { + isForCredential: false, + }; + const ndvStore = useNDVStore(); + if (ndvStore.isInputParentOfActiveNode) { + opts = { + ...opts, + targetItem: ndvStore.expressionTargetItem ?? undefined, + inputNodeName: ndvStore.ndvInputNodeName, + inputRunIndex: ndvStore.ndvInputRunIndex, + inputBranchIndex: ndvStore.ndvInputBranchIndex, + }; + } + resolved = resolveExpression(value, undefined, opts); } catch (error) { resolved = `Error in expression: "${error.message}"`; }