Fix crash when running automations with an app action trigger without parameters
This commit is contained in:
parent
3a33f5b376
commit
caef092f8a
|
@ -97,7 +97,7 @@ exports.externalTrigger = async function (
|
|||
// values are likely to be submitted as strings, so we shall convert to correct type
|
||||
const coercedFields = {}
|
||||
const fields = automation.definition.trigger.inputs.fields
|
||||
for (let key of Object.keys(fields)) {
|
||||
for (let key of Object.keys(fields || {})) {
|
||||
coercedFields[key] = coerce(params.fields[key], fields[key])
|
||||
}
|
||||
params.fields = coercedFields
|
||||
|
|
Loading…
Reference in New Issue