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
|
return count
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
let existingCount = 0
|
||||||
const existingCount = countExistingSteps(automation.definition.steps)
|
if (automation?.definition) {
|
||||||
|
existingCount = countExistingSteps(automation.definition.steps)
|
||||||
|
}
|
||||||
if (existingCount === 0) {
|
if (existingCount === 0) {
|
||||||
return baseName
|
return baseName
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue