From 794f26af221c9e33de3785b7aa14b6aa215a3d9b Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sun, 28 Apr 2013 20:51:56 -0500 Subject: [PATCH] Fix invalid sessions causing a half-logged in state --- www/assets/js/callbacks.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/www/assets/js/callbacks.js b/www/assets/js/callbacks.js index c17b9d54..0ce9effd 100644 --- a/www/assets/js/callbacks.js +++ b/www/assets/js/callbacks.js @@ -136,8 +136,11 @@ function initCallbacks() { }); socket.on("login", function(data) { - if(!data.success && data.error != "Invalid session") - alert(data.error); + if(!data.success) { + if(data.error != "Invalid session") { + alert(data.error); + } + } else { $("#welcome")[0].innerHTML = "Welcome, " + uname; $("#loginform").css("display", "none");