X-Git-Url: https://git.auder.net/assets/icon_close.svg?a=blobdiff_plain;f=client%2Fsrc%2Futils%2Fstorage.js;h=8a7c52684813f35d11dfdcfa40aded8ee034aee4;hb=b4fb161253c5e7b4581ca37d22339111dd4aa861;hp=48435b51175b2efb4fd5b03ec3c15a51735e929e;hpb=2c4ea524d5acf3793e6f1283f888e4ed4e767644;p=vchess.git diff --git a/client/src/utils/storage.js b/client/src/utils/storage.js index 48435b51..8a7c5268 100644 --- a/client/src/utils/storage.js +++ b/client/src/utils/storage.js @@ -110,12 +110,12 @@ export const GameStorage = // localStorage: // TODO: also option to takeback a move ? Is fen included in move ? // NOTE: for live games only (all on server for corr) - update: function(fen, moves, clocks, started, score) + update: function(fen, move, clocks, started, score) { let gameState = JSON.parse(localStorage.getItem("gameState")); if (!!fen) { - gameState.moves = moves; + gameState.moves.push(move); gameState.fen = fen; gameState.clocks = clocks; }