fix: popular posts sort
This commit is contained in:
parent
8b61b7783b
commit
008a0393c8
2 changed files with 19 additions and 2 deletions
|
@ -31,7 +31,7 @@ module.exports = {
|
|||
if (analytics.find((p) => p.url.includes(post.url))) return true
|
||||
})
|
||||
.sort((a, b) => {
|
||||
const visitors = (page) => analytics.filter((p) => p.url.includes(page.url)).pop().value
|
||||
const visitors = (page) => analytics.filter((p) => p.url.includes(page.url)).pop().rank
|
||||
return visitors(b) - visitors(a)
|
||||
})
|
||||
},
|
||||
|
|
Reference in a new issue