#564 - only pass strings to the taxonomy dashboard

This commit is contained in:
Elio Struyf
2023-04-04 16:25:29 +02:00
parent 11103ad52f
commit 6f2dc2cb52
3 changed files with 16 additions and 1 deletions
+12
View File
@@ -1,5 +1,17 @@
# Change Log
## [8.5.0] - 2023-xx-xx
### ✨ New features
### 🎨 Enhancements
### ⚡️ Optimizations
### 🐞 Fixes
- [#564](https://github.com/estruyf/vscode-front-matter/issues/564): Fix to only pass strings to the taxonomy dashboard
## [8.4.0] - 2023-04-03 - [Release notes](https://beta.frontmatter.codes/updates/v8.4.0)
### 🧪 Experimental features
+1 -1
View File
@@ -33,7 +33,7 @@
"type": "string",
"name": "year",
"title": "Year",
"default": "2022"
"default": "{{year}}"
},
{
"type": "string",
@@ -42,6 +42,9 @@ export const TaxonomyManager: React.FunctionComponent<ITaxonomyManagerProps> = (
crntItems = data.customTaxonomy.find((c) => c.id === taxonomy)?.options || [];
}
// Only allow string values
crntItems = crntItems.filter((i) => typeof i === 'string');
// Alphabetically sort the items
crntItems = Object.assign([], crntItems).sort((a: string, b: string) => {
a = a || '';