fix(editor): Add fallback for expression resolution in multi-output case (#9045)

This commit is contained in:
Iván Ovejero 2024-04-03 17:07:58 +02:00 committed by GitHub
parent a45fd0dbf4
commit bcd39a110b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -197,7 +197,12 @@ export function resolveParameter(
) { ) {
runIndexCurrent = workflowRunData[contextNode!.name].length - 1; 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( ExpressionEvaluatorProxy.setEvaluator(
useSettingsStore().settings.expressions?.evaluator ?? 'tmpl', useSettingsStore().settings.expressions?.evaluator ?? 'tmpl',