Skip to content

PouchDB 7.0.0 - TypeError: Cannot ready property 'id' of null #95

@aneer-anwar

Description

@aneer-anwar

Android : 7.1.4
IOS : 4.5.5

I tried PouchDB 7.0.0 and 6.4.0 with pouchdb-adapter-cordova-sqlite 2.05 and 2.0.2
with Cordova-sqlite-storage,cordova-plugin-sqlite-2 and cordova-plugin-websql.
cacheableLayers = {
"A" : "aaaaa",
"B" : "bbbb"

}
for (let key in cacheableLayers) {

        ddoc.views[key] = {
            map: "function (doc) { "
                + "if (doc['" + key + "'] ){"
                + "emit('" + key + "',doc['" + key + "']);"
                + "}"
                + "}"
        }
    }

db.put(ddoc).then()...
When I try to put view into pouchdb I get the error: 'TypeError: Cannot read property 'id' of null' in android. Fortunately, the same code works correctly in IOS without any glitch.

Please help.
IMG-20190404-WA0002

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions