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