From c01abe4c6fbd5e1d1e3fb7191f188e599c74b17e Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Thu, 11 Jan 2024 11:20:37 +0000 Subject: [PATCH] null check --- .../automation/SetupPanel/AutomationSelector.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationSelector.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationSelector.svelte index ae45bfd8a1..7e3ba92420 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationSelector.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationSelector.svelte @@ -21,9 +21,10 @@ } $: if (value?.automationId == null) value = { automationId: "" } - $: automationFields = $automationStore.automations.find( - automation => automation._id === value?.automationId - )?.definition?.trigger?.inputs?.fields + $: automationFields = + $automationStore.automations.find( + automation => automation._id === value?.automationId + )?.definition?.trigger?.inputs?.fields || [] $: filteredAutomations = $automationStore.automations.filter( automation =>