From 7291e6aac6146ebbbd5a29526427cc08abe97b26 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Mon, 25 Oct 2021 10:24:08 +0200 Subject: [PATCH] Fix tag replacement --- CHANGELOG.md | 4 +++- src/panelWebView/components/Tags.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9498cd7a..344bcc8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/panelWebView/components/Tags.tsx b/src/panelWebView/components/Tags.tsx index a7f2cead..c699997f 100644 --- a/src/panelWebView/components/Tags.tsx +++ b/src/panelWebView/components/Tags.tsx @@ -18,7 +18,7 @@ const Tags: React.FunctionComponent = (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}`;