X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Futils%2FgameStorage.js;h=05aaef7404fc4bb90e6ba72c0552804efb01802a;hp=7fadbedddf9021358089d57f2c71ae76e57b2125;hb=4f298adbee00942323fc7ec517117552aeb5a08a;hpb=602d6befd30793111d3fda6e733f73e08d8b7a30 diff --git a/client/src/utils/gameStorage.js b/client/src/utils/gameStorage.js index 7fadbedd..05aaef74 100644 --- a/client/src/utils/gameStorage.js +++ b/client/src/utils/gameStorage.js @@ -48,7 +48,6 @@ function dbOperation(callback) export const GameStorage = { // Optional callback to get error status - // TODO: this func called from Hall seems to not work now... add: function(game, callback) { dbOperation((db) => { @@ -81,8 +80,9 @@ export const GameStorage = gid: gameId, newObj: { + // Some fields may be undefined: chat: obj.chat, - move: obj.move, //may be undefined... + move: obj.move, fen: obj.fen, score: obj.score, scoreMsg: obj.scoreMsg,