Minor bug fix to ensure getPathSteps builds correctly. This will fix the test details

This commit is contained in:
Dean 2025-01-02 10:29:39 +00:00
parent 5088979b18
commit fa06f7b6e8
1 changed files with 2 additions and 2 deletions

View File

@ -291,8 +291,8 @@ const automationActions = (store: AutomationStore) => ({
let result: (AutomationStep | AutomationTrigger)[] = []
pathWay.forEach(path => {
const { stepIdx, branchIdx } = path
let last = result ? result[result.length - 1] : []
if (!result) {
let last = result.length ? result[result.length - 1] : []
if (!result.length) {
// Preceeding steps.
result = steps.slice(0, stepIdx + 1)
return