From 6818e4debb36abb73cbeafffa648b1e452e3cdd6 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 23 May 2023 16:12:20 +0100 Subject: [PATCH] check collection actually exists --- packages/server/src/automations/steps/collect.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/server/src/automations/steps/collect.ts b/packages/server/src/automations/steps/collect.ts index 3ceadcb714..1107c68c32 100644 --- a/packages/server/src/automations/steps/collect.ts +++ b/packages/server/src/automations/steps/collect.ts @@ -45,8 +45,14 @@ export const definition: AutomationStepSchema = { } export async function run({ inputs }: AutomationStepInput) { - return { - success: true, - value: inputs.collection, + if (!inputs.collection) { + return { + success: false, + } + } else { + return { + success: true, + value: inputs.collection, + } } }