From 426f63271b38b2c6582148717b53435223b1124f Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 20 Jul 2023 10:46:05 +0200 Subject: [PATCH] Fix redirect on delete --- .../backend/TableNavigator/popovers/EditViewPopover.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte b/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte index febe7c3c84..9b18ecc890 100644 --- a/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte +++ b/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte @@ -34,7 +34,9 @@ async function deleteView() { try { const isSelected = - decodeURIComponent($params.viewName) === $views.selectedViewName + view.tableId === $views.selected.tableId && + view.name === $views.selected.name + const { tableId } = view await views.delete(view) notifications.success("View deleted")