X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Futils%2Fstorage.js;h=eb04078198d6c9b81def2b7b6fdd9914a72fe430;hp=2c2d4be27f3c8b23b4870e68c27e7f0e4596a89e;hb=d6c1bf3726afae94867854dda76df2848770068c;hpb=e64c6f67185b45b3b1205069532362c1bf9680db diff --git a/client/src/utils/storage.js b/client/src/utils/storage.js index 2c2d4be2..eb040781 100644 --- a/client/src/utils/storage.js +++ b/client/src/utils/storage.js @@ -137,7 +137,7 @@ export const GameStorage = // indexedDB: // Since DB requests are asynchronous, require a callback using the result // TODO: option for remote retrieval (third arg, or just "gameRef") - getLocal: function(callback, gameId) + getLocal: function(gameId, callback) { let games = []; dbOperation((db) => { @@ -200,6 +200,6 @@ export const GameStorage = } // Game is local and not running - getLocal(callback, gid); + GameStorage.getLocal(gid, callback); }, };