mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-03-28 17:42:40 +01:00
#7 - Fix for excluding null values
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -16,7 +16,7 @@
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/dist/**/*.js"
|
||||
],
|
||||
"preLaunchTask": "npm: webpack"
|
||||
// "preLaunchTask": "npm: webpack"
|
||||
},
|
||||
{
|
||||
"name": "Extension Tests",
|
||||
|
||||
8
.vscode/tasks.json
vendored
8
.vscode/tasks.json
vendored
@@ -15,6 +15,14 @@
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "webpack",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ export class Settings {
|
||||
crntTags = [...crntTags, ...tags];
|
||||
// Update the tags and filter out the duplicates
|
||||
crntTags = [...new Set(crntTags)];
|
||||
crntTags = crntTags.sort();
|
||||
crntTags = crntTags.sort().filter(t => !!t);
|
||||
await config.update(SETTING_TAXONOMY_TAGS, crntTags);
|
||||
|
||||
// Retrieve the currently known tags, and add the new ones
|
||||
@@ -132,7 +132,7 @@ export class Settings {
|
||||
crntCategories = [...crntCategories, ...categories];
|
||||
// Update the categories and filter out the duplicates
|
||||
crntCategories = [...new Set(crntCategories)];
|
||||
crntCategories = crntCategories.sort();
|
||||
crntCategories = crntCategories.sort().filter(c => !!c);
|
||||
await config.update(SETTING_TAXONOMY_CATEGORIES, crntCategories);
|
||||
|
||||
// Done
|
||||
|
||||
@@ -31,7 +31,7 @@ export class SettingsHelper {
|
||||
const config = vscode.workspace.getConfiguration(CONFIG_KEY);
|
||||
const configSetting = type === TaxonomyType.Tag ? SETTING_TAXONOMY_TAGS : SETTING_TAXONOMY_CATEGORIES;
|
||||
options = [...new Set(options)];
|
||||
options = options.sort();
|
||||
options = options.sort().filter(o => !!o);
|
||||
await config.update(configSetting, options);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user