From 7eca53f9e7f0640bd43fc37abbe6eb624d77430d Mon Sep 17 00:00:00 2001 From: Faton Ramadani Date: Fri, 12 Apr 2024 15:58:12 +0200 Subject: [PATCH] fix(frontend): Correctly handle undefined actions (#3545) --- .../editor/contextPanel/components/TableActionsOutput.svelte | 2 +- .../src/lib/components/apps/editor/inlineScriptsPanel/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/apps/editor/contextPanel/components/TableActionsOutput.svelte b/frontend/src/lib/components/apps/editor/contextPanel/components/TableActionsOutput.svelte index 1f23a4b356..c877f13bb8 100644 --- a/frontend/src/lib/components/apps/editor/contextPanel/components/TableActionsOutput.svelte +++ b/frontend/src/lib/components/apps/editor/contextPanel/components/TableActionsOutput.svelte @@ -13,7 +13,7 @@ {/each} {/if} - {#if (gridItem.data.type === 'aggridcomponent' || gridItem.data.type === 'aggridcomponentee') && gridItem.data.actions.length > 0} + {#if (gridItem.data.type === 'aggridcomponent' || gridItem.data.type === 'aggridcomponentee') && gridItem.data.actions?.length > 0}
{#each gridItem.data.actions as action, index} diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts index 45b6a64e06..6b7060b8e8 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts @@ -67,7 +67,7 @@ function processGridItemRunnable(gridItem: GridItem, list: AppScriptsList): AppS } if (component.type === 'aggridcomponent' || component.type === 'aggridcomponentee') { - component.actions.forEach((actionButton) => { + component.actions?.forEach((actionButton) => { if (actionButton.componentInput?.type !== 'runnable') { return }