diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-01-25 02:45:00 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-01-25 02:45:00 +0100 |
| commit | 6d27fd0f8cd44ffc1e216b94680bde3a83511995 (patch) | |
| tree | bf956c9a49e94a35b05fd056c320fa0866ddb016 /public/assets | |
| parent | 8631c4ba8e68fc6d29962597cc86ff06606037a5 (diff) | |
sort
Diffstat (limited to 'public/assets')
| -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 967204e..085873e 100644 --- a/public/assets/js/lib/views/details/comments.js +++ b/public/assets/js/lib/views/details/comments.js @@ -22,7 +22,9 @@ var CommentsView = FormView.extend({ this.$el.prepend(this.$formRow) } else { - comments.forEach(this.appendComment.bind(this)) + comments + .sort((a,b) => cmp(a.date, b.date)) + .forEach(this.appendComment.bind(this)) } }, |
