ensuure we don't store 'null' in the name->guid cache object
(an alternative to #572)
This commit is contained in:
parent
8c539078cb
commit
7f9399bbeb
@ -43,11 +43,11 @@ window.playerNameToGuid = function(playerName) {
|
||||
$.each(Object.keys(sessionStorage), function(ind,key) {
|
||||
if(playerName === sessionStorage[key]) {
|
||||
guid = key;
|
||||
window._playerNameToGuidCache[playerName] = guid;
|
||||
return false; //break from $.each
|
||||
}
|
||||
});
|
||||
|
||||
window._playerNameToGuidCache[playerName] = guid;
|
||||
return guid;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user