From 7f9399bbeb6f4d09ece38ce05f449375dc871527 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sat, 21 Sep 2013 02:17:12 +0100 Subject: [PATCH] ensuure we don't store 'null' in the name->guid cache object (an alternative to #572) --- code/player_names.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/player_names.js b/code/player_names.js index d8bfda37..e79cf874 100644 --- a/code/player_names.js +++ b/code/player_names.js @@ -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; }