X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Futils%2FgameStorage.js;h=dc653794d36a2b567371efed97013d134e29adc9;hp=0b3a7da64e350748f93f0963990b9f550a0a03e1;hb=92b82defacccf9c4d3755924a71fcb584002ccc6;hpb=afc426016772300cc2812e8f96dd964bc6ae739d diff --git a/client/src/utils/gameStorage.js b/client/src/utils/gameStorage.js index 0b3a7da6..dc653794 100644 --- a/client/src/utils/gameStorage.js +++ b/client/src/utils/gameStorage.js @@ -133,7 +133,11 @@ export const GameStorage = if (Number.isInteger(gameId) || !isNaN(parseInt(gameId))) { ajax("/games", "GET", {gid:gameId}, res => { - callback(res.game); + let game = res.game; + game.moves.forEach(m => { + m.squares = JSON.parse(m.squares); + }); + callback(game); }); } else //local game