Replace undefined check with length check
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user