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.
