From 7d98cdd9b8ed903a2349d5ab5cd152892c476a68 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 18 Dec 2017 22:30:03 +0100 Subject: hootbox --- public/assets/js/lib/views/details/comments.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'public/assets/js/lib/views/details') diff --git a/public/assets/js/lib/views/details/comments.js b/public/assets/js/lib/views/details/comments.js index 0c2cdcc..ad43939 100644 --- a/public/assets/js/lib/views/details/comments.js +++ b/public/assets/js/lib/views/details/comments.js @@ -16,7 +16,9 @@ var CommentsView = FormView.extend({ load: function(comments, thread){ if (thread.settings.hootbox) { - comments.forEach(this.prependComment.bind(this)) + comments + .sort((a,b) => return cmp(a.date, b.date)) + .forEach(this.prependComment.bind(this)) this.$el.prepend(this.$formRow) } else { -- cgit v1.2.3-70-g09d2