mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-06 17:02:54 +02:00
#369 - taxonomy fix
This commit is contained in:
@@ -41,7 +41,6 @@ export const TaxonomyLookup: React.FunctionComponent<ITaxonomyLookupProps> = ({
|
||||
}).length;
|
||||
}, [taxonomy, value, pages, settings?.contentTypes]);
|
||||
|
||||
|
||||
const onNavigate = useCallback(() => {
|
||||
if (total) {
|
||||
navigate(`${routePaths.contents}?taxonomy=${taxonomy}&value=${value}`);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user