From 67b44dce42e8909b7c4d1ae0e82a6f426b01929c Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Mon, 19 Sep 2022 09:52:02 +0200 Subject: [PATCH] #369 - taxonomy fix --- .../components/TaxonomyView/TaxonomyLookup.tsx | 1 - src/listeners/dashboard/PagesListener.ts | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dashboardWebView/components/TaxonomyView/TaxonomyLookup.tsx b/src/dashboardWebView/components/TaxonomyView/TaxonomyLookup.tsx index c37b304d..5008f420 100644 --- a/src/dashboardWebView/components/TaxonomyView/TaxonomyLookup.tsx +++ b/src/dashboardWebView/components/TaxonomyView/TaxonomyLookup.tsx @@ -41,7 +41,6 @@ export const TaxonomyLookup: React.FunctionComponent = ({ }).length; }, [taxonomy, value, pages, settings?.contentTypes]); - const onNavigate = useCallback(() => { if (total) { navigate(`${routePaths.contents}?taxonomy=${taxonomy}&value=${value}`); diff --git a/src/listeners/dashboard/PagesListener.ts b/src/listeners/dashboard/PagesListener.ts index 592b4db7..af42d614 100644 --- a/src/listeners/dashboard/PagesListener.ts +++ b/src/listeners/dashboard/PagesListener.ts @@ -307,11 +307,11 @@ export class PagesListener extends BaseListener { let tagParents = ContentType.findFieldByType(contentType.fields, "tags"); const tagsValue = ContentType.getFieldValue(article.data, tagParents.length !== 0 ? tagParents : ["tags"]); - page.fmTags = typeof tagsValue === "string" ? tagsValue.split(",") : []; + page.fmTags = typeof tagsValue === "string" ? tagsValue.split(",") : tagsValue; let categoryParents = ContentType.findFieldByType(contentType.fields, "categories"); const categoriesValue = ContentType.getFieldValue(article.data, categoryParents.length !== 0 ? categoryParents : ["categories"]); - page.fmCategories = typeof categoriesValue === "string" ? categoriesValue.split(",") : []; + page.fmCategories = typeof categoriesValue === "string" ? categoriesValue.split(",") : categoriesValue; // Check if parent fields were retrieved, if not there was no image present if (previewFieldParents.length > 0) {