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.
Description
In the
AppPouchDBDatabaseBehavior
function__computeDb
has switched arduments. According todb
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: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.