Don't offer existing databases if there aren't any

This commit is contained in:
Robert
2024-02-14 16:30:58 +00:00
parent 0f4a7788a7
commit 8c87493d76

View File

@@ -828,6 +828,12 @@ export class DatabaseUI extends DisposableObject {
}
private async promptForDatabase(): Promise<void> {
// If there aren't any existing databases,
// don't bother asking the user if they want to pick one.
if (this.databaseManager.databaseItems.length === 0) {
return this.importNewDatabase();
}
const quickPickItems: DatabaseSelectionQuickPickItem[] = [
{
label: "$(database) Existing database",