From c133efa25805300dabd2126d7d6764a65a192280 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 26 May 2017 18:08:03 -0400 Subject: [PATCH] Fix tests --- src/topics/popular.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/topics/popular.js b/src/topics/popular.js index 7d756a1548..5b5d3f9402 100644 --- a/src/topics/popular.js +++ b/src/topics/popular.js @@ -60,7 +60,7 @@ module.exports = function (Topics) { function sortTiedTopicsByViews(topics, next) { topics.sort(function (a, b) { - return parseInt(a.postcount) !== parseInt(b.postcount) ? 0 : parseInt(b.viewcount, 10) - parseInt(a.viewcount, 10); + return parseInt(a.postcount, 10) !== parseInt(b.postcount, 10) ? 0 : parseInt(b.viewcount, 10) - parseInt(a.viewcount, 10); }); next(null, topics);