From 6db20a241b2040f89492fc5ac208b18d3e86d3bb Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 13 Aug 2024 14:33:07 +0100 Subject: [PATCH] PR feedback --- packages/builder/src/dataBinding.js | 3 +-- .../_components/Component/ConditionalUIDrawer.svelte | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/dataBinding.js b/packages/builder/src/dataBinding.js index e3e195ede1..a7e98e1c3f 100644 --- a/packages/builder/src/dataBinding.js +++ b/packages/builder/src/dataBinding.js @@ -298,8 +298,7 @@ export const getActionProviders = ( // Find the definition of the action in question, if one is provided .map(context => ({ ...context, - - action: context.contexts[0].actions.find(x => x.type === actionType), + action: context.contexts[0]?.actions?.find(x => x.type === actionType), })) // Filter out contexts which don't have this action .filter(({ action }) => action != null) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ConditionalUIDrawer.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ConditionalUIDrawer.svelte index 387a7e000b..c7139a81e2 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ConditionalUIDrawer.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ConditionalUIDrawer.svelte @@ -151,7 +151,7 @@ const onSettingChange = (e, condition) => { const setting = settings.find(x => x.key === e.detail) if (setting?.defaultValue != null) { - condition.settingValue = setting?.defaultValue + condition.settingValue = setting.defaultValue } else { delete condition.settingValue }