This commit is contained in:
Peter Clement 2024-09-23 15:02:37 +01:00
parent 189caa6235
commit 335240718c
1 changed files with 0 additions and 2 deletions

View File

@ -59,14 +59,12 @@
} }
const getAutomationNameError = name => { const getAutomationNameError = name => {
if (stepNames && editing) { if (stepNames && editing) {
// Check against stepNames
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 "This name already exists, please enter a unique name" return "This name already exists, please enter a unique name"
} }
} }
// Check against other block names
for (const step of allSteps) { for (const step of allSteps) {
if (step.id !== block.id && name === step.name) { if (step.id !== block.id && name === step.name) {
return "This name already exists, please enter a unique name" return "This name already exists, please enter a unique name"