X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Futils%2FgameStorage.js;h=2e78994286cbb19cdb795b8ca6880e6b04cd92f5;hb=dcff8e82dd8bbc285d9c2d5d5e3b361a9ecfa9ac;hp=4eb6bc730ed71fe10ec382145793fc45d97cb173;hpb=db1f1f9adb920605c7a16b060a7737e54636ee08;p=vchess.git diff --git a/client/src/utils/gameStorage.js b/client/src/utils/gameStorage.js index 4eb6bc73..2e789942 100644 --- a/client/src/utils/gameStorage.js +++ b/client/src/utils/gameStorage.js @@ -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]; @@ -96,7 +96,7 @@ export const GameStorage = { }, // Retrieve all local games (running, completed, imported...) - // light: do not retrieve moves or players or clocks (TODO: this is the only usage) + // light: do not retrieve moves or clocks (TODO: this is the only usage) getAll: function(light, callback) { dbOperation((err,db) => { let objectStore = db.transaction("games").objectStore("games"); @@ -111,7 +111,6 @@ export const GameStorage = { delete g.moves; delete g.clocks; delete g.initime; - delete g.players; } games.push(g); cursor.continue();