From bcd39a110b4ca4c35b66340cec240dfc0c83132c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 3 Apr 2024 17:07:58 +0200 Subject: [PATCH] fix(editor): Add fallback for expression resolution in multi-output case (#9045) --- packages/editor-ui/src/composables/useWorkflowHelpers.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/composables/useWorkflowHelpers.ts b/packages/editor-ui/src/composables/useWorkflowHelpers.ts index 2b99fee6f2..1e26d6d8a8 100644 --- a/packages/editor-ui/src/composables/useWorkflowHelpers.ts +++ b/packages/editor-ui/src/composables/useWorkflowHelpers.ts @@ -197,7 +197,12 @@ export function resolveParameter( ) { runIndexCurrent = workflowRunData[contextNode!.name].length - 1; } - const _executeData = executeData(parentNode, contextNode!.name, inputName, runIndexCurrent); + let _executeData = executeData(parentNode, contextNode!.name, inputName, runIndexCurrent); + + if (!_executeData.source) { + // fallback to parent's run index for multi-output case + _executeData = executeData(parentNode, contextNode!.name, inputName, runIndexParent); + } ExpressionEvaluatorProxy.setEvaluator( useSettingsStore().settings.expressions?.evaluator ?? 'tmpl',