From 3bebe2b0f567344980d9df25612c07ef8f3d1096 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 21 Oct 2023 14:44:12 +0200 Subject: [PATCH] make select tab more resilient --- .../components/apps/components/inputs/AppSelectTab.svelte | 2 +- frontend/src/lib/components/common/table/AppRow.svelte | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/apps/components/inputs/AppSelectTab.svelte b/frontend/src/lib/components/apps/components/inputs/AppSelectTab.svelte index 0d022327f0..a9efd73ab7 100644 --- a/frontend/src/lib/components/apps/components/inputs/AppSelectTab.svelte +++ b/frontend/src/lib/components/apps/components/inputs/AppSelectTab.svelte @@ -52,7 +52,7 @@ function setDefaultValue() { if (resolvedConfig.defaultValue === undefined) { - selected = resolvedConfig.items[0].value + selected = resolvedConfig.items?.[0]?.value } else if (resolvedConfig.defaultValue) { selected = resolvedConfig.defaultValue } diff --git a/frontend/src/lib/components/common/table/AppRow.svelte b/frontend/src/lib/components/common/table/AppRow.svelte index d6d3f7c1ff..7e7beee6f2 100644 --- a/frontend/src/lib/components/common/table/AppRow.svelte +++ b/frontend/src/lib/components/common/table/AppRow.svelte @@ -142,6 +142,13 @@ }, type: 'delete', disabled: !canWrite + }, + { + displayName: 'View/Edit JSON', + icon: faFileExport, + action: () => { + loadAppJson() + } } ] }