Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: don't overwrite when switching sheets BYT-3804 (#7668)

Liu Jie838b3d9d58a
diff --git a/frontend/src/views/sql-editor/Sheet/context.ts b/frontend/src/views/sql-editor/Sheet/context.ts
index a6736a1d10..e317bb0e68 100644
--- a/frontend/src/views/sql-editor/Sheet/context.ts
+++ b/frontend/src/views/sql-editor/Sheet/context.ts
@@ -126,6 +126,7 @@ export const openSheet = async (sheet: Sheet, forceNewTab = false) => {
if (openingSheetTab) {
// Switch to a sheet tab if it's open already.
tabStore.setCurrentTabId(openingSheetTab.id);
+ return true;
} else if (forceNewTab) {
tabStore.addTab(newTab, true /* beside */);
} else {