From f813a26ff0674530169ea6ae1fed7723e561030c Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 25 Jul 2023 14:32:21 +0100 Subject: [PATCH] packages/builder/src/components/backend/DataTable/DataTable.svelte --- .../src/components/backend/DataTable/DataTable.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index 836ea0e696..d4c994dae5 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -28,16 +28,16 @@ $: isInternal = $tables.selected?.type !== "external" $: datasource = $datasources.list.find(datasource => { - return datasource._id === $tables.selected.sourceId + return datasource._id === $tables.selected?.sourceId }) + $: relationshipsEnabled = relationshipSupport(datasource) + const relationshipSupport = datasource => { const integration = $integrations[datasource?.source] return !isInternal && integration?.relationships !== false } - $: relationshipsEnabled = relationshipSupport(datasource) - const handleGridTableUpdate = async e => { tables.replaceTable(id, e.detail)