Attempt to clarify installation instructions a little
[vchess.git] / client / src / utils / importgameStorage.js
index e5ad6e2..bcda4fd 100644 (file)
@@ -33,6 +33,7 @@ function dbOperation(callback) {
 }
 
 export const ImportgameStorage = {
+
   // Optional callback to get error status
   add: function(game, callback) {
     dbOperation((err, db) => {
@@ -47,7 +48,7 @@ export const ImportgameStorage = {
       };
       transaction.onerror = function(err) {
         // Duplicate key error (most likely)
-        callback(err);
+        callback(err.target.error);
       };
       transaction.objectStore("importgames").add(game);
     });
@@ -110,4 +111,5 @@ export const ImportgameStorage = {
       }
     });
   }
+
 };