remove known bad entries from localStorage.userHash...
This commit is contained in:
1 parent
936bf8df9d
commit
2e03485db4
1 file changed
+7
-2
@@ -246,10 +246,15 @@ define([
|
|||||||
var getUserHash = common.getUserHash = function () {
|
var getUserHash = common.getUserHash = function () {
|
||||||
var hash = localStorage[userHashKey];
|
var hash = localStorage[userHashKey];
|
||||||
|
|
||||||
if (hash && ['undefined', 'undefined/'].indexOf(hash) === -1) {
|
if (['undefined', 'undefined/'].indexOf(hash) === -1) {
|
||||||
|
localStorage.removeItem(userHashKey);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hash) {
|
||||||
var sHash = common.serializeHash(hash);
|
var sHash = common.serializeHash(hash);
|
||||||
if (sHash !== hash) { localStorage[userHashKey] = sHash; }
|
if (sHash !== hash) { localStorage[userHashKey] = sHash; }
|
||||||
} else { return; }
|
}
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user