From 8a3e3ca4f2e1b64012ae275f8bf01127a87c100d Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Sun, 15 Mar 2020 20:09:06 -0500 Subject: [PATCH] work around sync issues by reloading page when switching game --- js/chess.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/chess.js b/js/chess.js index a526934..90d731a 100644 --- a/js/chess.js +++ b/js/chess.js @@ -750,14 +750,16 @@ function switchGameId(newId){ return; } + boardElem.data('gameId', newId); + location.hash = '#/' + newId; + if (gameId) { //gun.get(PacoSakoUUID).get('games').get(gameId).off(); //gun.get(PacoSakoUUID).get('meta').get(gameId).off(); + location.reload(); + return; } - boardElem.data('gameId', newId); - location.hash = '#/' + newId; - const notifyAfter = new Date().getTime() + 2000; $(window).data('notifyAfter', new Date().getTime() + 2000); window.setTimeout(function() {