Merge pull request #15611 from Budibase/fix/automation-traversal

Fix for automation traversal
This commit is contained in:
deanhannigan 2025-02-24 18:42:55 +00:00 committed by GitHub
commit 8db13bfb32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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
}, },