Add debug traces to understand what happens with first corr move
[vchess.git] / client / src / utils / gameStorage.js
index 4eb6bc7..2756496 100644 (file)
@@ -62,6 +62,7 @@ export const GameStorage = {
   update: function(gameId, obj) {
     if (Number.isInteger(gameId) || !isNaN(parseInt(gameId))) {
       // corr: only move, fen and score
+console.log(obj.move);
       ajax("/games", "PUT", {
         gid: gameId,
         newObj: {
@@ -96,7 +97,7 @@ export const GameStorage = {
   },
 
   // Retrieve all local games (running, completed, imported...)
-  // light: do not retrieve moves or players or clocks (TODO: this is the only usage)
+  // light: do not retrieve moves or clocks (TODO: this is the only usage)
   getAll: function(light, callback) {
     dbOperation((err,db) => {
       let objectStore = db.transaction("games").objectStore("games");
@@ -111,7 +112,6 @@ export const GameStorage = {
             delete g.moves;
             delete g.clocks;
             delete g.initime;
-            delete g.players;
           }
           games.push(g);
           cursor.continue();