From: Benjamin Auder Date: Sat, 4 Apr 2020 17:31:30 +0000 (+0200) Subject: Fix player name update X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/css/current/img/common.css?a=commitdiff_plain;h=64714bd681d6f8eb355b52c47345457b8c5fcec3;p=vchess.git Fix player name update --- diff --git a/client/src/utils/gameStorage.js b/client/src/utils/gameStorage.js index 42f43884..fe7335e5 100644 --- a/client/src/utils/gameStorage.js +++ b/client/src/utils/gameStorage.js @@ -89,7 +89,7 @@ export const GameStorage = { else if (k == "chat") game.chats.push(obj[k]); else if (k == "chatRead") game.chatRead = Date.now(); else if (k == "delchat") game.chats = []; - else if (k == "playerName") game.players[obj.idx] = obj.name; + else if (k == "playerName") game.players[obj[k].idx] = obj[k].name; else game[k] = obj[k]; }); objectStore.put(game); //save updated data