Better menu ordering ?
[vchess.git] / client / src / utils / gameStorage.js
index 7fadbed..f995828 100644 (file)
@@ -4,7 +4,7 @@
 //   vname: string,
 //   fenStart: string,
 //   players: array of sid+id+name,
-//   timeControl: string,
+//   cadence: string,
 //   increment: integer (seconds),
 //   mode: string ("live" or "corr")
 //   imported: boolean (optional, default false)
@@ -48,7 +48,6 @@ function dbOperation(callback)
 export const GameStorage =
 {
   // Optional callback to get error status
-  // TODO: this func called from Hall seems to not work now...
   add: function(game, callback)
   {
     dbOperation((db) => {
@@ -81,8 +80,9 @@ export const GameStorage =
           gid: gameId,
           newObj:
           {
+            // Some fields may be undefined:
             chat: obj.chat,
-            move: obj.move, //may be undefined...
+            move: obj.move,
             fen: obj.fen,
             score: obj.score,
             scoreMsg: obj.scoreMsg,