diff --git a/config/filters.js b/config/filters.js index ddca9c3b..8424d5d9 100644 --- a/config/filters.js +++ b/config/filters.js @@ -21,7 +21,7 @@ module.exports = { if (analytics.find((p) => p.page === post.url)) return true }) .sort((a, b) => { - const visitors = (page) => analytics.filter((p) => p.page === page.url)[0].visitors + const visitors = (page) => analytics.filter((p) => p.page === page.url).pop().visitors return visitors(b) - visitors(a) }) },