mirror of https://github.com/calzoneman/sync.git
Fix invalid sessions causing a half-logged in state
This commit is contained in:
parent
bdfd7ad3dc
commit
794f26af22
|
@ -136,8 +136,11 @@ function initCallbacks() {
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on("login", function(data) {
|
socket.on("login", function(data) {
|
||||||
if(!data.success && data.error != "Invalid session")
|
if(!data.success) {
|
||||||
|
if(data.error != "Invalid session") {
|
||||||
alert(data.error);
|
alert(data.error);
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
$("#welcome")[0].innerHTML = "Welcome, " + uname;
|
$("#welcome")[0].innerHTML = "Welcome, " + uname;
|
||||||
$("#loginform").css("display", "none");
|
$("#loginform").css("display", "none");
|
||||||
|
|
Loading…
Reference in New Issue