return falsey if userHash is junk

This commit is contained in:
ansuz
2017-05-31 18:08:41 +02:00
parent 105e5cdac9
commit 936bf8df9d

View File

@@ -246,10 +246,10 @@ define([
var getUserHash = common.getUserHash = function () {
var hash = localStorage[userHashKey];
if (hash && ['undefined', 'undefined/'].indexOf(hash) !== -1) {
if (hash && ['undefined', 'undefined/'].indexOf(hash) === -1) {
var sHash = common.serializeHash(hash);
if (sHash !== hash) { localStorage[userHashKey] = sHash; }
}
} else { return; }
return hash;
};