diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte index 0aa43f8e04..523f00b351 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItemHeader.svelte @@ -22,7 +22,7 @@ const dispatch = createEventDispatcher() $: blockRefs = $selectedAutomation?.blockRefs || {} - $: stepNames = automation?.definition.stepNames + $: stepNames = automation?.definition.stepNames || {} $: allSteps = automation?.definition.steps || [] $: automationName = itemName || stepNames?.[block.id] || block?.name || "" $: automationNameError = getAutomationNameError(automationName) @@ -64,7 +64,7 @@ const getAutomationNameError = name => { const duplicateError = "This name already exists, please enter a unique name" - if (stepNames && editing) { + if (editing) { for (const [key, value] of Object.entries(stepNames)) { if (name !== block.name && name === value && key !== block.id) { return duplicateError