fix(frontend): Correctly handle undefined actions (#3545)

This commit is contained in:
Faton Ramadani
2024-04-12 15:58:12 +02:00
committed by GitHub
parent e9e6614486
commit 7eca53f9e7
2 changed files with 2 additions and 2 deletions
@@ -13,7 +13,7 @@
{/each}
</div>
{/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}
<div class="ml-2 border-l">
{#each gridItem.data.actions as action, index}
<Output id={action.id} first={index === 0} label="Table action" />
@@ -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
}