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)