diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-13 04:32:57 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-13 04:32:57 +0100 |
| commit | 55067d74fb2a472aa5de9c0c917d1219821b81fe (patch) | |
| tree | f04d470a012bcc28e16c4fd37795763d5631bd02 /public/assets/js/lib/views/index | |
| parent | 6c87173b16d0cc2b5f62ee7b47830f7d16b152e8 (diff) | |
thread zero check
Diffstat (limited to 'public/assets/js/lib/views/index')
| -rw-r--r-- | public/assets/js/lib/views/index/threadbox.js | 8 |
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){ |
