commento.js: sort comments by score by default

This commit is contained in:
Adhityaa Chandrasekar 2018-09-23 02:30:00 -04:00
parent 8ebc0cd965
commit b4f2ba41be

View File

@ -587,6 +587,10 @@
return null; return null;
} }
cur.sort(function(a, b) {
return a.score - b.score;
});
var cards = create("div"); var cards = create("div");
cur.forEach(function(comment) { cur.forEach(function(comment) {
var commenter = commenters[comment.commenterHex]; var commenter = commenters[comment.commenterHex];