Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

revsLimit and adapter variables switched in __computeDb #22

Open
jarrodek opened this issue Oct 1, 2016 · 1 comment
Open

revsLimit and adapter variables switched in __computeDb #22

jarrodek opened this issue Oct 1, 2016 · 1 comment

Comments

@jarrodek
Copy link

jarrodek commented Oct 1, 2016

Description

In the AppPouchDBDatabaseBehavior function __computeDb has switched arduments. According to db attribute definition this is computed by __computeDb(dbName, adapter, revsLimit) however, actual function body is __computeDb: function(name, revsLimit, adapter).
It causes error when trying to put anything to the data store:

Uncaught TypeError: Cannot read property '2' of undefined
at traverseRevTree (VM4319 pouchdb.js:3619)
at stem (VM4319 pouchdb.js:3914)
at merge (VM4319 pouchdb.js:3927)
at nextDoc (VM4319 pouchdb.js:5953)
at VM4319 pouchdb.js:5959
at _Map.15._Map.forEach (VM4319 pouchdb.js:2574)
at processDocs (VM4319 pouchdb.js:5933)
at idbProcessDocs (VM4319 pouchdb.js:6331)
at checkDone (VM4319 pouchdb.js:6345)
at IDBRequest.readMetadata (VM4319 pouchdb.js:6355)

This error is caused because of the switch. At this point PouchDB is expecting different parameter. After I switch back this parameters in by bower_components folder my test cases started working.

jarrodek added a commit to arc-archive/app-pouchdb that referenced this issue Oct 1, 2016
jarrodek added a commit to arc-archive/app-pouchdb that referenced this issue Oct 1, 2016
jarrodek added a commit to arc-archive/app-pouchdb that referenced this issue Oct 1, 2016
@kasperstorgaard
Copy link

made a pull for this: #52

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants