Fix tag replacement

This commit is contained in:
Elio Struyf
2021-10-25 10:24:08 +02:00
parent a7aab96f0e
commit 7291e6aac6
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -1,10 +1,12 @@
# Change Log
## [5.x.x] - 2021-xx-xx
## [5.2.1] - 2021-10-25
### 🐞 Fixes
- Value check when generating slug from title
- Fix for date time formatting with `DD` and `YYYY` tokens
- Fix in tag space replacing when object is passed
## [5.2.0] - 2021-10-19
+1 -1
View File
@@ -18,7 +18,7 @@ const Tags: React.FunctionComponent<ITagsProps> = (props: React.PropsWithChildre
const unknownTags = values.filter(v => !options.includes(v));
const generateKey = (tag: string, idx: number) => {
if (tag) {
if (tag && typeof tag === 'string') {
return `${tag.replace(/ /g, "_")}-${idx}`;
}
return `tag-${idx}`;