From 68c8769686da985314180600979fb6d5f724d140 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 21 Jun 2021 13:41:58 +0100 Subject: [PATCH] Fixing issue stopping view test from creating tables. --- .../builder/src/components/backend/DataTable/DataTable.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index ea14104eea..e87ad35184 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -23,14 +23,14 @@ schema, name: $views.selected?.name, } - $: type = $tables.selected.type + $: type = $tables.selected?.type $: isInternal = type === "internal" // Fetch rows for specified table $: { loading = true const loadingTableId = $tables.selected?._id - api.fetchDataForTable($tables.selected._id).then(rows => { + api.fetchDataForTable($tables.selected?._id).then(rows => { loading = false // If we started a slow request then quickly change table, sometimes