Merge branch 'master' into typing/stores-grid-ui

This commit is contained in:
Adria Navarro 2024-12-30 22:11:40 +01:00 committed by GitHub
commit a6307301bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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