From 4168b45a77a78c6eaf8ca947a37177e64c106cee Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 27 Sep 2023 11:14:14 +0100 Subject: [PATCH] PR comments. --- packages/builder/src/stores/backend/tables.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/stores/backend/tables.js b/packages/builder/src/stores/backend/tables.js index 7e01e0d511..457a58fdbb 100644 --- a/packages/builder/src/stores/backend/tables.js +++ b/packages/builder/src/stores/backend/tables.js @@ -81,12 +81,13 @@ export function createTablesStore() { replaceTable(savedTable._id, savedTable) select(savedTable._id) // make sure tables up to date (related) - const tableIdsToFetch = [] + let tableIdsToFetch = [] for (let column of Object.values(updatedTable?.schema || {})) { if (column.type === FIELDS.LINK.type) { tableIdsToFetch.push(column.tableId) } } + tableIdsToFetch = [...new Set(tableIdsToFetch)] // too many tables to fetch, just get all if (tableIdsToFetch.length > 3) { await fetch() @@ -114,7 +115,6 @@ export function createTablesStore() { indexes, }) => { let draft = cloneDeep(get(derivedStore).selected) - console.log(draft) // delete the original if renaming // need to handle if the column had no name, empty string