Skip to content

Commit

Permalink
fix(core): Fix empty node execution stack (#12945)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov authored Jan 30, 2025
1 parent 9d02733 commit 7031569
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions packages/core/src/execution-engine/workflow-execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1221,18 +1221,9 @@ export class WorkflowExecute {
});
}

/** Node execution stack will be empty for an execution containing only Chat Trigger. */
const startNode = this.runExecutionData.executionData.nodeExecutionStack.at(0)?.node.name;

if (!startNode) {
throw new ApplicationError('Failed to run workflow due to empty node execution stack', {
extra: {
workflowId: workflow.id,
executionId: this.additionalData.executionId,
mode: this.mode,
},
});
}

let destinationNode: string | undefined;
if (this.runExecutionData.startData && this.runExecutionData.startData.destinationNode) {
destinationNode = this.runExecutionData.startData.destinationNode;
Expand Down

0 comments on commit 7031569

Please sign in to comment.