summaryrefslogtreecommitdiff
path: root/public/assets/js/lib/views/index/threadbox.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js/lib/views/index/threadbox.js')
-rw-r--r--public/assets/js/lib/views/index/threadbox.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/public/assets/js/lib/views/index/threadbox.js b/public/assets/js/lib/views/index/threadbox.js
index 83ac269..65ad945 100644
--- a/public/assets/js/lib/views/index/threadbox.js
+++ b/public/assets/js/lib/views/index/threadbox.js
@@ -91,9 +91,11 @@ var ThreadBox = View.extend({
},
appendThreads: function(threads){
- threads[0].first = true
- threads[threads.length-1].last = true
- threads.forEach(this.appendThread.bind(this))
+ if (threads.length) {
+ threads[0].first = true
+ threads[threads.length-1].last = true
+ threads.forEach(this.appendThread.bind(this))
+ }
},
appendThread: function(thread){