Skip to content

Commit

Permalink
Allow unused catgs and tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimafisk committed Jul 1, 2022
1 parent fe501df commit 7dd5f50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions layouts/scripts/catgs_tags.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
let obj = {
name: tagContent[index].fields.name,
path: tagContent[index].path,
posts: Object.values(tagsObj[tagContent[index].fields.name]),
length: Object.keys(tagsObj[tagContent[index].fields.name]).length,
posts: tagsObj[tagContent[index].fields.name] ? Object.values(tagsObj[tagContent[index].fields.name]) : null,
length: tagsObj[tagContent[index].fields.name] ? Object.keys(tagsObj[tagContent[index].fields.name]).length : null,
};
tagsList.push(obj);
}
Expand All @@ -67,8 +67,8 @@
let obj = {
name: catContent[index].fields.name,
path: catContent[index].path,
posts: Object.values(catgObj[catContent[index].fields.name]),
length: Object.keys(catgObj[catContent[index].fields.name]).length,
posts: catgObj[catContent[index].fields.name] ? Object.values(catgObj[catContent[index].fields.name]) : null,
length: catgObj[catContent[index].fields.name] ? Object.keys(catgObj[catContent[index].fields.name]).length : null,
};
catgList.push(obj);
}
Expand Down

0 comments on commit 7dd5f50

Please sign in to comment.