diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-18 22:30:03 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-18 22:30:03 +0100 |
| commit | 7d98cdd9b8ed903a2349d5ab5cd152892c476a68 (patch) | |
| tree | 092dcd066ff713da8660ecc2a0a4de46eab45f23 /public/assets/js/lib/views/details | |
| parent | 148bdaec5aaf66b885d7070894b81dfd76df2d5c (diff) | |
hootbox
Diffstat (limited to 'public/assets/js/lib/views/details')
| -rw-r--r-- | public/assets/js/lib/views/details/comments.js | 4 |
1 files changed, 3 insertions, 1 deletions
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 { |
