From fa06f7b6e8f0911f5bb0d3d0a7a96f2795fac3a3 Mon Sep 17 00:00:00 2001 From: Dean Date: Thu, 2 Jan 2025 10:29:39 +0000 Subject: [PATCH] Minor bug fix to ensure getPathSteps builds correctly. This will fix the test details --- packages/builder/src/stores/builder/automations.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/stores/builder/automations.ts b/packages/builder/src/stores/builder/automations.ts index c43a856cc4..9b20b4cd03 100644 --- a/packages/builder/src/stores/builder/automations.ts +++ b/packages/builder/src/stores/builder/automations.ts @@ -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