mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
🐛 Fix bug that highest nodes did not get found when one was disabled
This commit is contained in:
parent
88a82efe07
commit
b38623fa92
|
@ -459,7 +459,7 @@ export class Workflow {
|
||||||
|
|
||||||
if (checkedNodes!.includes(nodeName)) {
|
if (checkedNodes!.includes(nodeName)) {
|
||||||
// Node got checked already before
|
// Node got checked already before
|
||||||
return [];
|
return currentHighest;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkedNodes!.push(nodeName);
|
checkedNodes!.push(nodeName);
|
||||||
|
@ -491,11 +491,8 @@ export class Workflow {
|
||||||
}
|
}
|
||||||
|
|
||||||
addNodes.forEach((name) => {
|
addNodes.forEach((name) => {
|
||||||
// Only add if:
|
// Only add if node is not on the list already anyway
|
||||||
// - Node is not on the list already anyway
|
if (returnNodes.indexOf(name) === -1) {
|
||||||
// - And if it has not been checked already which means that we
|
|
||||||
// are in a loop
|
|
||||||
if (returnNodes.indexOf(name) === -1 && !checkedNodes!.includes(name)) {
|
|
||||||
returnNodes.push(name);
|
returnNodes.push(name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue