Null safety when creating automation from design
This commit is contained in:
parent
ecb0bad923
commit
8e8ee2b056
|
@ -52,7 +52,7 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
newBlock.inputs = {
|
newBlock.inputs = {
|
||||||
fields: Object.keys(parameters.fields).reduce((fields, key) => {
|
fields: Object.keys(parameters.fields ?? {}).reduce((fields, key) => {
|
||||||
fields[key] = "string"
|
fields[key] = "string"
|
||||||
return fields
|
return fields
|
||||||
}, {}),
|
}, {}),
|
||||||
|
@ -66,6 +66,7 @@
|
||||||
$automationStore.selectedAutomation.automation._id
|
$automationStore.selectedAutomation.automation._id
|
||||||
delete parameters.newAutomationName
|
delete parameters.newAutomationName
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log("ERROR ", error)
|
||||||
notifications.error("Error creating automation")
|
notifications.error("Error creating automation")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue