diff options
Diffstat (limited to 'public/assets/js')
| -rw-r--r-- | public/assets/js/lib/views/index/threadbox.js | 8 | ||||
| -rw-r--r-- | public/assets/js/lib/views/login/login.js | 1 |
2 files changed, 6 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){ diff --git a/public/assets/js/lib/views/login/login.js b/public/assets/js/lib/views/login/login.js index 48676e9..0144006 100644 --- a/public/assets/js/lib/views/login/login.js +++ b/public/assets/js/lib/views/login/login.js @@ -16,6 +16,7 @@ var LoginView = FormView.extend({ success: function(data){ console.log("LOGGED IN?", data) + console.log(data.user) if (data.user) { auth.set_user(data.user) } |
