From ca40d39d500a52b3283064e3ccff0284ee563d04 Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 7 Jul 2023 11:21:40 +0100 Subject: [PATCH] Added presence check for the entities object when fetching tables --- .../Datasources/TableImportSelection/tableSelectionStore.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/builder/src/components/backend/Datasources/TableImportSelection/tableSelectionStore.js b/packages/builder/src/components/backend/Datasources/TableImportSelection/tableSelectionStore.js index be20da7cd6..6fd2750f82 100644 --- a/packages/builder/src/components/backend/Datasources/TableImportSelection/tableSelectionStore.js +++ b/packages/builder/src/components/backend/Datasources/TableImportSelection/tableSelectionStore.js @@ -10,9 +10,8 @@ export const createTableSelectionStore = (integration, datasource) => { datasources.getTableNames(datasource).then(tableNames => { tableNamesStore.set(tableNames) - selectedTableNamesStore.set( - tableNames.filter(tableName => datasource.entities[tableName]) + tableNames.filter(tableName => datasource.entities?.[tableName]) ) loadingStore.set(false)