fix error with updating existinh name count
This commit is contained in:
parent
0c11924027
commit
27b65e22ef
|
@ -105,9 +105,10 @@ export const getNewStepName = (automation, step) => {
|
|||
return count
|
||||
}, 0)
|
||||
}
|
||||
|
||||
const existingCount = countExistingSteps(automation.definition.steps)
|
||||
|
||||
let existingCount = 0
|
||||
if (automation?.definition) {
|
||||
existingCount = countExistingSteps(automation.definition.steps)
|
||||
}
|
||||
if (existingCount === 0) {
|
||||
return baseName
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue