From 7b7b2a12eab5cc7f37d79f818c26fa3381bcc260 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 6 Nov 2023 10:06:32 +0000 Subject: [PATCH] fix issue with stepNames being undefined --- .../AutomationBuilder/FlowChart/FlowItemHeader.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte index 4c72c57208..0c7ac3d27d 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte @@ -58,9 +58,11 @@ } const getAutomationNameError = name => { - for (const [key, value] of Object.entries(stepNames)) { - if (name === value && key !== block.id) { - return "This name already exists, please enter a unique name" + if (stepNames) { + for (const [key, value] of Object.entries(stepNames)) { + if (name === value && key !== block.id) { + return "This name already exists, please enter a unique name" + } } }