diff --git a/src/commands/Folders.ts b/src/commands/Folders.ts index 08ba1b0d..f125ead1 100644 --- a/src/commands/Folders.ts +++ b/src/commands/Folders.ts @@ -495,6 +495,10 @@ export class Folders { public static async getContentFolders() { // Find folders that contain files const wsFolder = Folders.getWorkspaceFolder(); + if (!wsFolder) { + return []; + } + const supportedFiles = Settings.get(SETTING_CONTENT_SUPPORTED_FILETYPES) || DEFAULT_FILE_TYPES; const patterns = supportedFiles.map(