fix(core): Account for enabled state in first pinned trigger (#3912)

🐛 Account for enabled state in first pinned trigger
This commit is contained in:
Iván Ovejero 2022-08-22 17:45:06 +02:00 committed by GitHub
parent 725a567f07
commit 6bd7a09a45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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],
);
}