mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-10-13 23:38:45 +01:00
Do not open first container if a tab is already open (#2045)
Co-authored-by: Laurent Nguyen <languye@microsoft.com>
This commit is contained in:
parent
5945e3cb6b
commit
7893b89bf7
@ -181,6 +181,11 @@ async function configureFabric(): Promise<Explorer> {
|
||||
}
|
||||
|
||||
const openFirstContainer = async (explorer: Explorer, databaseName: string, collectionName?: string) => {
|
||||
if (useTabs.getState().openedTabs.length > 0) {
|
||||
// Don't open any tabs if there are already tabs open
|
||||
return;
|
||||
}
|
||||
|
||||
// Expand database first
|
||||
databaseName = sessionStorage.getItem("openDatabaseName") ?? databaseName;
|
||||
const database = useDatabases.getState().databases.find((db) => db.id() === databaseName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user