null check on definition and selected automation
This commit is contained in:
parent
77a5b3478d
commit
bfa3a663f1
|
@ -210,7 +210,7 @@ const automationActions = store => ({
|
||||||
*/
|
*/
|
||||||
traverse: (blockRefs, automation) => {
|
traverse: (blockRefs, automation) => {
|
||||||
let blocks = []
|
let blocks = []
|
||||||
if (automation.definition.trigger) {
|
if (automation.definition?.trigger) {
|
||||||
blocks.push(automation.definition.trigger)
|
blocks.push(automation.definition.trigger)
|
||||||
}
|
}
|
||||||
blocks = blocks.concat(automation.definition.steps || [])
|
blocks = blocks.concat(automation.definition.steps || [])
|
||||||
|
@ -689,7 +689,7 @@ const automationActions = store => ({
|
||||||
type,
|
type,
|
||||||
id: generate(),
|
id: generate(),
|
||||||
}
|
}
|
||||||
newName = getNewStepName(get(selectedAutomation).data, newStep)
|
newName = getNewStepName(get(selectedAutomation)?.data, newStep)
|
||||||
newStep.name = newName
|
newStep.name = newName
|
||||||
return newStep
|
return newStep
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue