filter unwanted fields from received JSON board string
This commit is contained in:
parent
d37cb4a67f
commit
ce7a69a10a
|
|
@ -478,7 +478,8 @@ $(function (){
|
|||
cancelGameCallback = gun.get(PacoSakoUUID).get('games').get(newId).onWithCancel(function(d) {
|
||||
if (d && d.board) {
|
||||
try {
|
||||
const moves = JSON.parse(d.board);
|
||||
const received = JSON.parse(d.board);
|
||||
const moves = { past: [...received.past], future: [...received.future] };
|
||||
const oldState = { past: currentGame.moves, future: currentGame.redoMoves };
|
||||
|
||||
if (deepEqual(moves, oldState)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue