From 62ea461d477a1d90307721f2501b773e8f38e553 Mon Sep 17 00:00:00 2001 From: Michael J Feher Date: Fri, 17 Nov 2017 08:57:38 -0600 Subject: [PATCH] :beetle: PouchDB - Cannot read property 'force' of undefined Throws the an error on change while searching for keys on an undefined object. If options are undefined, we pass a empty object ``` Uncaught (in promise) TypeError: Cannot read property 'force' of undefined ``` --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 0039e6f..c05ea56 100644 --- a/index.js +++ b/index.js @@ -134,16 +134,16 @@ }) }, put: function(db, object, options) { - return databases[db].put(object, options); + return databases[db].put(object, options || {}); }, post: function(db, object, options) { - return databases[db].post(object, options); + return databases[db].post(object, options || {}); }, remove: function(db, object, options) { - return databases[db].remove(object, options); + return databases[db].remove(object, options || {}); }, get: function(db, object, options) { - return databases[db].get(object, options); + return databases[db].get(object, options || {}); }, session: {}, errors: {},