Skip to content

Commit

Permalink
🪲 PouchDB - Cannot read property 'force' of undefined
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
PhearZero committed Nov 17, 2017
1 parent 4e63c46 commit 62ea461
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Expand Up @@ -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: {},
Expand Down

0 comments on commit 62ea461

Please sign in to comment.