mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-06 00:07:25 +02:00
Fix tests
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user