X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=51e06340a1e98f8306990fdf9c645cbd4f509964;hp=851c6d767582e13a47b92a0e00fe7ca5124f2358;hb=a13cbc0f2c8cf46c0584118a11af9e3cd6bbdcb9;hpb=b91392511d5df54b0e3cd5fcf439471cc6767804 diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 851c6d76..51e06340 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -469,7 +469,9 @@ export default { const flags = V.ParseFen(game.fen).flags; //may be undefined let dtLastMove = 0; for (let midx = game.moves.length - 1; midx >= 0; midx--) { - vr_tmp.undo(Object.assign({flags:flags}, game.moves[midx].squares)); + // NOTE: flags could be wrong, but since our only concern is turn, + // this should be enough. (TODO?) + vr_tmp.undo(Object.assign({flags:JSON.stringify(flags)}, game.moves[midx].squares)); if (vr_tmp.turn == mycolor) { dtLastMove = game.moves[midx].played; break;