fix(editor): Fix issue that double incoming connection often does not resolve expression (no-changelog) (#7257)

Cherry-picked from AI Tool Creation branch

---------

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Alex Grozav
2023-09-26 14:33:42 +01:00
committed by GitHub
parent 4b014286cf
commit 0824800dff
2 changed files with 238 additions and 8 deletions

View File

@@ -305,8 +305,8 @@ function connectionInputData(
return connectionInputData;
}
function executeData(
parentNode: string[],
export function executeData(
parentNodes: string[],
currentNode: string,
inputName: string,
runIndex: number,
@@ -317,12 +317,10 @@ function executeData(
source: null,
} as IExecuteData;
if (parentNode.length) {
// Add the input data to be able to also resolve the short expression format
// which does not use the node name
const parentNodeName = parentNode[0];
const workflowsStore = useWorkflowsStore();
const workflowsStore = useWorkflowsStore();
// Find the parent node which has data
for (const parentNodeName of parentNodes) {
if (workflowsStore.shouldReplaceInputDataWithPinData) {
const parentPinData = workflowsStore.getPinData![parentNodeName];
@@ -337,7 +335,6 @@ function executeData(
}
// populate `executeData` from `runData`
const workflowRunData = workflowsStore.getWorkflowRunData;
if (workflowRunData === null) {
return executeData;
@@ -368,6 +365,7 @@ function executeData(
],
};
}
return executeData;
}
}