From 40f7ca5a2f70f53214d71de4794a7568b6cc90e0 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Tue, 5 Sep 2023 10:58:20 +0200 Subject: [PATCH 1/2] Return empty array on empty project --- src/commands/Folders.ts | 4 ++++ 1 file changed, 4 insertions(+) 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( From 83f15b65a40758943d4f0d0374ad1f0fca2d87ed Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Tue, 5 Sep 2023 11:46:32 +0200 Subject: [PATCH 2/2] #648 - update schema reference --- CHANGELOG.md | 1 + package.json | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b68ef32e..7b6f4598 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - [#646](https://github.com/estruyf/vscode-front-matter/issues/646): Update the Astro `3000` port to `4321` - [#647](https://github.com/estruyf/vscode-front-matter/issues/647): Fix the open in browser action on the preview +- [#648](https://github.com/estruyf/vscode-front-matter/issues/648): Fix the global configuration reference to the URL of the schema file ## [9.1.0] - 2023-08-31 diff --git a/package.json b/package.json index eb97a624..3e166d80 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,6 @@ ] }, "configuration": { - "$id": "#globalconfiguration", "title": "%settings.configuration.title%", "type": "object", "properties": { @@ -121,7 +120,7 @@ "markdownDescription": "%setting.frontMatter.projects.items.properties.default.markdownDescription%" }, "configuration": { - "$ref": "#globalconfiguration" + "$ref": "https://frontmatter.codes/frontmatter.schema.json" } } }