Fix for automation traversal to ensure all paths calculate their terminated condition

This commit is contained in:
Dean 2025-02-24 16:38:03 +00:00
parent 3517f8cbc1
commit bf486542c8
1 changed files with 1 additions and 2 deletions

View File

@ -484,7 +484,7 @@ const automationActions = (store: AutomationStore) => ({
branches.forEach((branch, bIdx) => { branches.forEach((branch, bIdx) => {
children[branch.id].forEach( children[branch.id].forEach(
(bBlock: AutomationStep, sIdx: number, array: AutomationStep[]) => { (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) treeTraverse(bBlock, pathToCurrentNode, sIdx, bIdx, ended)
} }
) )
@ -505,7 +505,6 @@ const automationActions = (store: AutomationStore) => ({
blocks.forEach((block, idx, array) => { blocks.forEach((block, idx, array) => {
treeTraverse(block, null, idx, null, array.length - 1 === idx) treeTraverse(block, null, idx, null, array.length - 1 === idx)
}) })
return blockRefs return blockRefs
}, },