Attempt to clarify installation instructions a little
[vchess.git] / client / src / utils / compgameStorage.js
index 655fd6b..c846304 100644 (file)
@@ -37,6 +37,7 @@ function dbOperation(callback) {
 }
 
 export const CompgameStorage = {
+
   add: function(game) {
     dbOperation((err, db) => {
       if (err) return;
@@ -55,7 +56,7 @@ export const CompgameStorage = {
         .objectStore("compgames");
       objectStore.get(gameId).onsuccess = function(event) {
         // Ignoring error silently: shouldn't happen now. TODO?
-        if (event.target.result) {
+        if (!!event.target.result) {
           const game = event.target.result;
           Object.keys(obj).forEach(k => {
             if (k == "move") game.moves.push(obj[k]);
@@ -90,4 +91,5 @@ export const CompgameStorage = {
       }
     });
   }
+
 };