From d4605a02ac9edd27b3884537dfdc67945d950e06 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sat, 4 Apr 2020 19:33:15 +0200
Subject: [PATCH] Fix player name update

---
 client/src/utils/gameStorage.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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
-- 
2.44.0