From bf486542c8cb15c55f490ee8cec4314154d9ea65 Mon Sep 17 00:00:00 2001 From: Dean Date: Mon, 24 Feb 2025 16:38:03 +0000 Subject: [PATCH] Fix for automation traversal to ensure all paths calculate their terminated condition --- packages/builder/src/stores/builder/automations.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/builder/src/stores/builder/automations.ts b/packages/builder/src/stores/builder/automations.ts index 039a057a1b..eeee973290 100644 --- a/packages/builder/src/stores/builder/automations.ts +++ b/packages/builder/src/stores/builder/automations.ts @@ -484,7 +484,7 @@ const automationActions = (store: AutomationStore) => ({ branches.forEach((branch, bIdx) => { children[branch.id].forEach( (bBlock: AutomationStep, sIdx: number, array: AutomationStep[]) => { - const ended = array.length - 1 === sIdx && !branches.length + const ended = array.length - 1 === sIdx treeTraverse(bBlock, pathToCurrentNode, sIdx, bIdx, ended) } ) @@ -505,7 +505,6 @@ const automationActions = (store: AutomationStore) => ({ blocks.forEach((block, idx, array) => { treeTraverse(block, null, idx, null, array.length - 1 === idx) }) - return blockRefs },