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