refactor(core): Abstract away duplication when finding first pinned trigger (no-changelog) (#5927)

This commit is contained in:
Michael Kret
2023-08-10 15:06:16 +03:00
committed by GitHub
parent 258e0ebb0f
commit 7f0db60f15
4 changed files with 66 additions and 16 deletions

View File

@@ -292,13 +292,7 @@ class WorkflowRunnerProcess {
) {
// Execute all nodes
let startNode;
if (
this.data.startNodes?.length === 1 &&
Object.keys(this.data.pinData ?? {}).includes(this.data.startNodes[0])
) {
startNode = this.workflow.getNode(this.data.startNodes[0]) ?? undefined;
}
const startNode = WorkflowHelpers.getExecutionStartNode(this.data, this.workflow);
// Can execute without webhook so go on
this.workflowExecute = new WorkflowExecute(additionalData, this.data.executionMode);