#633 - Fix custom taxonomy used as single value

This commit is contained in:
Elio Struyf
2023-08-25 10:53:42 +02:00
parent 38e485584f
commit a6c0685184
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -13,6 +13,7 @@
### 🐞 Fixes
- [#628](https://github.com/estruyf/vscode-front-matter/issues/628): Fix path argument and JSON data on custom scripts
- [#633](https://github.com/estruyf/vscode-front-matter/issues/633): Fix custom taxonomy used as single value
## [9.0.0] - 2023-08-21 - [Release notes](https://beta.frontmatter.codes/updates/v9.0.0)
@@ -97,6 +97,10 @@ export const TaxonomyManager: React.FunctionComponent<ITaxonomyManagerProps> = (
}
}
if (typeof values === 'string') {
values = [values];
}
for (const value of values) {
if (!items.includes(value)) {
unmapped.push(value);
@@ -111,6 +115,8 @@ export const TaxonomyManager: React.FunctionComponent<ITaxonomyManagerProps> = (
return null;
}
console.log('items', unmappedItems);
return (
<div className={`py-6 px-4 flex flex-col h-full overflow-hidden`}>
<div className={`flex w-full justify-between flex-shrink-0`}>