Merge branch 'master' into typing/stores-grid-ui
This commit is contained in:
commit
a6307301bf
|
@ -22,7 +22,7 @@
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
$: blockRefs = $selectedAutomation?.blockRefs || {}
|
$: blockRefs = $selectedAutomation?.blockRefs || {}
|
||||||
$: stepNames = automation?.definition.stepNames
|
$: stepNames = automation?.definition.stepNames || {}
|
||||||
$: allSteps = automation?.definition.steps || []
|
$: allSteps = automation?.definition.steps || []
|
||||||
$: automationName = itemName || stepNames?.[block.id] || block?.name || ""
|
$: automationName = itemName || stepNames?.[block.id] || block?.name || ""
|
||||||
$: automationNameError = getAutomationNameError(automationName)
|
$: automationNameError = getAutomationNameError(automationName)
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
const getAutomationNameError = name => {
|
const getAutomationNameError = name => {
|
||||||
const duplicateError =
|
const duplicateError =
|
||||||
"This name already exists, please enter a unique name"
|
"This name already exists, please enter a unique name"
|
||||||
if (stepNames && editing) {
|
if (editing) {
|
||||||
for (const [key, value] of Object.entries(stepNames)) {
|
for (const [key, value] of Object.entries(stepNames)) {
|
||||||
if (name !== block.name && name === value && key !== block.id) {
|
if (name !== block.name && name === value && key !== block.id) {
|
||||||
return duplicateError
|
return duplicateError
|
||||||
|
|
Loading…
Reference in New Issue