From 844971cdd948675edae2d912bfa12588d61ec90f Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Sat, 11 Jun 2022 20:00:03 +0200 Subject: [PATCH] Fix card render --- CHANGELOG.md | 6 ++++++ src/dashboardWebView/components/Contents/Item.tsx | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9289f03..81598c36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [7.3.3] - 2022-06-11 + +### 🐞 Fixes + +- Card render when taxonomy is not an array value + ## [7.3.2] - 2022-06-01 ### 🐞 Fixes diff --git a/src/dashboardWebView/components/Contents/Item.tsx b/src/dashboardWebView/components/Contents/Item.tsx index 447cf452..f6b24415 100644 --- a/src/dashboardWebView/components/Contents/Item.tsx +++ b/src/dashboardWebView/components/Contents/Item.tsx @@ -30,7 +30,13 @@ export const Item: React.FunctionComponent = ({ fmFilePath, date, ti } const tagField = settings.dashboardState.contents.tags; - return pageData[tagField] || []; + const tagsValue = pageData[tagField] || []; + + if (Array.isArray(tagsValue)) { + return tagsValue; + } + + return [tagsValue]; }, [settings, pageData]); if (view === DashboardViewType.Grid) {