fix: remove unnecessary sort
This commit is contained in:
parent
56c87d3ff2
commit
583ea56553
2 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ export const tagMap = (collection) => {
|
|||
|
||||
export const tagsSortedByCount = (collectionApi) => {
|
||||
const tagStats = {};
|
||||
const posts = collectionApi.getFilteredByGlob('src/posts/**/*.*').sort((a, b) => a.date - b.date);
|
||||
const posts = collectionApi.getFilteredByGlob('src/posts/**/*.*');
|
||||
posts.forEach((post) => {
|
||||
post.data.tags.forEach((tag) => {
|
||||
if (!tagStats[tag]) tagStats[tag] = 1;
|
||||
|
|
Reference in a new issue