fix: Fix resolving of expressions of deeply nested sub-nodes (#8612)

This commit is contained in:
oleg
2024-02-14 10:42:55 +01:00
committed by GitHub
parent d18cba37a4
commit f5274302f8
4 changed files with 52 additions and 43 deletions

View File

@@ -993,7 +993,13 @@ export class WorkflowDataProxy {
// Before resolving the pairedItem make sure that the requested node comes in the
// graph before the current one
const parentNodes = that.workflow.getParentNodes(that.contextNodeName);
const activeNode = that.workflow.getNode(that.activeNodeName);
let contextNode = that.contextNodeName;
if (activeNode) {
const parentMainInputNode = that.workflow.getParentMainInputNode(activeNode);
contextNode = parentMainInputNode.name ?? contextNode;
}
const parentNodes = that.workflow.getParentNodes(contextNode);
if (!parentNodes.includes(nodeName)) {
throw createExpressionError('Invalid expression', {
messageTemplate: 'Invalid expression under %%PARAMETER%%',