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 | |
| parent | 6c87173b16d0cc2b5f62ee7b47830f7d16b152e8 (diff) | |
thread zero check
| -rw-r--r-- | bucky/app/index.js | 2 | ||||
| -rw-r--r-- | public/assets/js/lib/views/index/threadbox.js | 8 | ||||
| -rw-r--r-- | public/assets/js/lib/views/login/login.js | 1 |
3 files changed, 7 insertions, 4 deletions
diff --git a/bucky/app/index.js b/bucky/app/index.js index efa5fdd..c445536 100644 --- a/bucky/app/index.js +++ b/bucky/app/index.js @@ -51,7 +51,7 @@ site.init = function(){ app.use(passport.session()) server = http.createServer(app).listen(process.env.PORT || 5000, function () { - console.log('Bucky listening at http://5.k:%s', server.address().port) + console.log('Bucky listening at http://' + process.env.HOST_NAME + ':%s', server.address().port) }) upload.init({ 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) } |
