diff --git a/CHANGELOG.md b/CHANGELOG.md index 33c43fa5..ddf930f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,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 5885fe44..efede6e8 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,6 @@ }] }, "configuration": { - "$id": "#globalconfiguration", "title": "%settings.configuration.title%", "type": "object", "properties": { @@ -115,7 +114,7 @@ "markdownDescription": "%setting.frontMatter.projects.items.properties.default.markdownDescription%" }, "configuration": { - "$ref": "#globalconfiguration" + "$ref": "https://frontmatter.codes/frontmatter.schema.json" } } } 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(