From: Benjamin Auder Date: Sat, 4 Apr 2020 17:33:15 +0000 (+0200) Subject: Fix player name update X-Git-Url: https://git.auder.net/variants/Cwda/complete_rules.html?a=commitdiff_plain;h=d4605a02ac9edd27b3884537dfdc67945d950e06;p=vchess.git Fix player name update --- diff --git a/client/src/utils/gameStorage.js b/client/src/utils/gameStorage.js index fe7335e5..99206ede 100644 --- a/client/src/utils/gameStorage.js +++ b/client/src/utils/gameStorage.js @@ -89,7 +89,8 @@ 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[k].idx] = obj[k].name; + else if (k == "playerName") + game.players[obj[k].idx].name = obj[k].name; else game[k] = obj[k]; }); objectStore.put(game); //save updated data