From 64714bd681d6f8eb355b52c47345457b8c5fcec3 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Sat, 4 Apr 2020 19:31:30 +0200 Subject: [PATCH] Fix player name update --- client/src/utils/gameStorage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.44.0