mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
Display node-error only on executing nodes (#2274)
* ⚡ Dot not display errors on disconnected nodes * ⚡ Fix some more inconsistencies
This commit is contained in:
@@ -231,13 +231,29 @@ export class Workflow {
|
||||
* @returns {(IWorfklowIssues | null)}
|
||||
* @memberof Workflow
|
||||
*/
|
||||
checkReadyForExecution(): IWorfklowIssues | null {
|
||||
checkReadyForExecution(inputData: {
|
||||
startNode?: string;
|
||||
destinationNode?: string;
|
||||
}): IWorfklowIssues | null {
|
||||
let node: INode;
|
||||
let nodeType: INodeType | undefined;
|
||||
let nodeIssues: INodeIssues | null = null;
|
||||
const workflowIssues: IWorfklowIssues = {};
|
||||
|
||||
for (const nodeName of Object.keys(this.nodes)) {
|
||||
let checkNodes: string[] = [];
|
||||
if (inputData.destinationNode) {
|
||||
// If a destination node is given we have to check all the nodes
|
||||
// leading up to it
|
||||
checkNodes = this.getParentNodes(inputData.destinationNode);
|
||||
checkNodes.push(inputData.destinationNode);
|
||||
} else if (inputData.startNode) {
|
||||
// If a start node is given we have to check all nodes which
|
||||
// come after it
|
||||
checkNodes = this.getChildNodes(inputData.startNode);
|
||||
checkNodes.push(inputData.startNode);
|
||||
}
|
||||
|
||||
for (const nodeName of checkNodes) {
|
||||
nodeIssues = null;
|
||||
node = this.nodes[nodeName];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user