Fix invalid sessions causing a half-logged in state

This commit is contained in:
calzoneman 2013-04-28 20:51:56 -05:00
parent bdfd7ad3dc
commit 794f26af22
1 changed files with 5 additions and 2 deletions

View File

@ -136,8 +136,11 @@ function initCallbacks() {
});
socket.on("login", function(data) {
if(!data.success && data.error != "Invalid session")
if(!data.success) {
if(data.error != "Invalid session") {
alert(data.error);
}
}
else {
$("#welcome")[0].innerHTML = "Welcome, " + uname;
$("#loginform").css("display", "none");