Fix cookies might not in boolean type cause page refresh loop

This commit is contained in:
Wu Cheng-Han 2016-07-30 10:59:51 +08:00
parent 423dccae0e
commit b8ff9112ef

View file

@ -53,7 +53,8 @@ function checkLoginStateChanged() {
}
function getLoginState() {
return Cookies.get('loginstate') === "true";
var state = Cookies.get('loginstate');
return state === "true" || state === true;
}
function getUserId() {