From d2480b4bbdba7aa5e78a0980919ad492534f54c4 Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Mon, 21 Sep 2026 09:12:08 +0200 Subject: [PATCH] fix: open the raw app data table drawer when the workspace has none Selecting the first data table of an empty list passed undefined to the name check, which threw instead of opening the drawer on no data table. Co-Authored-By: Claude Opus 5 (1M context) --- .../lib/components/raw_apps/RawAppDataTableDrawer.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/raw_apps/RawAppDataTableDrawer.svelte b/frontend/src/lib/components/raw_apps/RawAppDataTableDrawer.svelte index 8b9c31f452..0122c032b9 100644 --- a/frontend/src/lib/components/raw_apps/RawAppDataTableDrawer.svelte +++ b/frontend/src/lib/components/raw_apps/RawAppDataTableDrawer.svelte @@ -210,11 +210,17 @@ ) } - function selectDatatable(datatable: string, role?: string) { + // `undefined` where the workspace has no data table at all: the drawer opens on none, and + // its tree says so, rather than on a name that does not exist. + function selectDatatable(datatable: string | undefined, role?: string) { // A row clicked under another data table has just set the selection it should open on. openSchemaKey = selectedSchemaKey openTableKey = selectedTableKey selectedDatatable = datatable + if (datatable === undefined) { + selectedRole = undefined + return + } // A data table opens as the role its picked tables were browsed as, else the one the app // already uses it through. connectAs(