summaryrefslogtreecommitdiff
path: root/public/assets/js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-01-25 02:45:00 +0100
committerJules Laplace <julescarbon@gmail.com>2018-01-25 02:45:00 +0100
commit6d27fd0f8cd44ffc1e216b94680bde3a83511995 (patch)
treebf956c9a49e94a35b05fd056c320fa0866ddb016 /public/assets/js
parent8631c4ba8e68fc6d29962597cc86ff06606037a5 (diff)
sort
Diffstat (limited to 'public/assets/js')
-rw-r--r--public/assets/js/lib/views/details/comments.js4
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))
}
},