X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Futils%2FgameStorage.js;h=6885ed15639a65b66179641bcb36d868c5ea2904;hb=cc25444a44669a7deb6c096c1195f320d17590a1;hp=99206edeb567a182fcf40c4b046166405e4a3c9e;hpb=d4605a02ac9edd27b3884537dfdc67945d950e06;p=vchess.git diff --git a/client/src/utils/gameStorage.js b/client/src/utils/gameStorage.js index 99206ede..6885ed15 100644 --- a/client/src/utils/gameStorage.js +++ b/client/src/utils/gameStorage.js @@ -73,14 +73,13 @@ export const GameStorage = { // obj: chat, move, fen, clocks, score[Msg], initime, ... update: function(gameId, obj) { - // live dbOperation((err, db) => { let objectStore = db .transaction("games", "readwrite") .objectStore("games"); objectStore.get(gameId).onsuccess = function(event) { // Ignoring error silently: shouldn't happen now. TODO? - if (event.target.result) { + if (!!event.target.result) { let game = event.target.result; // Hidden tabs are delayed, to prevent multi-updates: if (obj.moveIdx < game.moves.length) return;