From caef092f8a9102bd5f7e4f4483352f007330add4 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 13 Jun 2022 10:56:50 +0100 Subject: [PATCH] Fix crash when running automations with an app action trigger without parameters --- packages/server/src/automations/triggers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/automations/triggers.js b/packages/server/src/automations/triggers.js index deff9f7503..216f24be02 100644 --- a/packages/server/src/automations/triggers.js +++ b/packages/server/src/automations/triggers.js @@ -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