From 2bbdb5ce46e17cabe44f505b41f1f87cd4aa9190 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 25 Aug 2023 12:29:32 +0100 Subject: [PATCH] Fix prod bug where screens are not deleted when the backing table is --- .../backend/TableNavigator/popovers/EditTablePopover.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/TableNavigator/popovers/EditTablePopover.svelte b/packages/builder/src/components/backend/TableNavigator/popovers/EditTablePopover.svelte index 4c5619cb06..1760938c53 100644 --- a/packages/builder/src/components/backend/TableNavigator/popovers/EditTablePopover.svelte +++ b/packages/builder/src/components/backend/TableNavigator/popovers/EditTablePopover.svelte @@ -44,7 +44,10 @@ const isSelected = $params.tableId === table._id try { await tables.delete(table) - await store.actions.screens.delete(templateScreens) + // Screens need deleted one at a time because of undo/redo + for (let screen of templateScreens) { + await store.actions.screens.delete(screen) + } if (table.type === "external") { await datasources.fetch() }