Merge pull request #12287 from Budibase/feat/automation-naming-ux-updates

Fix issue with automation names object being undefined
This commit is contained in:
Michael Drury 2023-11-06 10:16:12 +00:00 committed by GitHub
commit 0286b85625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

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