🐛 Fix issue that nodes did execute even if there was no input data

This commit is contained in:
Jan Oberhauser
2021-05-08 21:49:55 -05:00
parent 29b9ebfaff
commit b47f4bc012
3 changed files with 199 additions and 2 deletions

View File

@@ -401,6 +401,13 @@ export class WorkflowExecute {
nodeToAdd = parentNode;
}
const parentNodesNodeToAdd = workflow.getParentNodes(nodeToAdd as string);
if (parentNodesNodeToAdd.includes(parentNodeName) && nodeSuccessData[outputIndex].length === 0) {
// We do not add the node if there is no input data and the node that should be connected
// is a child of the parent node. Because else it would run a node even though it should be
// specifically not run, as it did not receive any data.
nodeToAdd = undefined;
}
if (nodeToAdd === undefined) {
// No node has to get added so process