From 844971cdd948675edae2d912bfa12588d61ec90f Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Sat, 11 Jun 2022 20:00:03 +0200 Subject: [PATCH 1/3] 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) { From 8ed64691c4e0dd944565358d1b0969fc03dac752 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Sat, 11 Jun 2022 20:00:16 +0200 Subject: [PATCH 2/3] 7.3.3 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index f784b325..fb080740 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vscode-front-matter-beta", - "version": "7.3.2", + "version": "7.3.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d5a9eb61..f53fe15c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Front Matter", "description": "Front Matter is a CMS that runs within Visual Studio Code. It gives you the power and control of a full-blown CMS while also providing you the flexibility and speed of the static site generator of your choice like: Hugo, Jekyll, Hexo, NextJs, Gatsby, and many more...", "icon": "assets/frontmatter-teal-128x128.png", - "version": "7.3.2", + "version": "7.3.3", "preview": false, "publisher": "eliostruyf", "galleryBanner": { From 7a2b45f031b48968606154e2a566be843ebae31d Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Sat, 11 Jun 2022 20:02:35 +0200 Subject: [PATCH 3/3] Fix double pages on contents dashboard --- CHANGELOG.md | 1 + src/listeners/dashboard/PagesListener.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81598c36..90025c2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### 🐞 Fixes - Card render when taxonomy is not an array value +- Double pages on contents dashboard ## [7.3.2] - 2022-06-01 diff --git a/src/listeners/dashboard/PagesListener.ts b/src/listeners/dashboard/PagesListener.ts index 42994f99..ac259c26 100644 --- a/src/listeners/dashboard/PagesListener.ts +++ b/src/listeners/dashboard/PagesListener.ts @@ -169,7 +169,7 @@ export class PagesListener extends BaseListener { try { const page = this.processPageContent(file.filePath, file.mtime, file.fileName, folder.title); - if (page) { + if (page && !pages.find(p => p.fmFilePath === page.fmFilePath)) { pages.push(page); }