Replace undefined check with length check

This commit is contained in:
Elena Tanasoiu
2023-01-31 17:02:41 +00:00
parent 6257608433
commit b6aa41d19b

View File

@@ -363,7 +363,7 @@ export class DatabaseUI extends DisposableObject {
token: CancellationToken, token: CancellationToken,
): Promise<void> => { ): Promise<void> => {
try { try {
if (workspace.workspaceFolders === undefined) { if (!workspace.workspaceFolders?.length) {
throw new Error("No workspace folder is open."); throw new Error("No workspace folder is open.");
} else { } else {
// This specifically refers to the database folder in // This specifically refers to the database folder in