Skip to content

Commit b8ff911

Browse files
committed
Fix cookies might not in boolean type cause page refresh loop
1 parent 423dcca commit b8ff911

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

public/js/common.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ function checkLoginStateChanged() {
5353
}
5454

5555
function getLoginState() {
56-
return Cookies.get('loginstate') === "true";
56+
var state = Cookies.get('loginstate');
57+
return state === "true" || state === true;
5758
}
5859

5960
function getUserId() {

0 commit comments

Comments
 (0)