Acceptable state, but still issues when a lot of moves arrive quickly on several...
[vchess.git] / client / src / utils / gameStorage.js
index dfbd639..2e78994 100644 (file)
@@ -83,7 +83,7 @@ export const GameStorage = {
         objectStore.get(gameId).onsuccess = function(event) {
           // Ignoring error silently: shouldn't happen now. TODO?
           if (event.target.result) {
-            const game = event.target.result;
+            let game = event.target.result;
             Object.keys(obj).forEach(k => {
               if (k == "move") game.moves.push(obj[k]);
               else game[k] = obj[k];