Skip to content

Commit

Permalink
fix(core): Account for enabled state in first pinned trigger (#3912)
Browse files Browse the repository at this point in the history
🐛 Account for enabled state in first pinned trigger
  • Loading branch information
ivov authored Aug 22, 2022
1 parent 725a567 commit 6bd7a09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cli/src/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2880,5 +2880,7 @@ const isTrigger = (nodeType: string) =>
function findFirstPinnedTrigger(workflow: IWorkflowDb, pinData?: IPinData) {
if (!pinData) return;

return workflow.nodes.find((node) => isTrigger(node.type) && pinData[node.name]);
return workflow.nodes.find(
(node) => !node.disabled && isTrigger(node.type) && pinData[node.name],
);
}

0 comments on commit 6bd7a09

Please sign in to comment.