summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2016-07-30 10:59:51 +0800
committerWu Cheng-Han2016-07-30 10:59:51 +0800
commitb8ff9112ef1556e6996b2f64ad6df559b6f2c2fb (patch)
tree6a55d860e9bfe3bb9fd59f0cba8a42763a0b2a72
parent423dccae0e4096aa1b84ce5c9c1cfa9624f0f841 (diff)
Fix cookies might not in boolean type cause page refresh loop
-rw-r--r--public/js/common.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/public/js/common.js b/public/js/common.js
index 5e9456bd..cfde462c 100644
--- a/public/js/common.js
+++ b/public/js/common.js
@@ -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() {