mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(core): Clean run data for dirty nodes properly, including their children (#13821)
This commit is contained in:
@@ -289,6 +289,27 @@ export class Workflow {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the nodes with the given names if they exist.
|
||||
* If a node cannot be found it will be ignored, meaning the returned array
|
||||
* of nodes can be smaller than the array of names.
|
||||
*/
|
||||
getNodes(nodeNames: string[]): INode[] {
|
||||
const nodes: INode[] = [];
|
||||
for (const name of nodeNames) {
|
||||
const node = this.getNode(name);
|
||||
if (!node) {
|
||||
console.warn(
|
||||
`Could not find a node with the name ${name} in the workflow. This was passed in as a dirty node name.`,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
nodes.push(node);
|
||||
}
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pinData of the node with the given name if it exists
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user