You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it("should not throw",async()=>{constdb=context.db;awaitdb.put({_id: '1',field: null});// FIXME: exception is thrown if documents field is `null`// and selector contains an arrayconstresp=awaitdb.find({selector: {field: ["what"]}});resp.docs.should.have.length(0);});
TypeError: Cannot read properties of null (reading '0') at getFieldFromDoc (packages/node_modules/pouchdb-selector-core/lib/index.js:14:18) at packages/node_modules/pouchdb-selector-core/lib/index.js:434:32 at Array.every (<anonymous>) at matchSelector (packages/node_modules/pouchdb-selector-core/lib/index.js:417:33) at packages/node_modules/pouchdb-selector-core/lib/index.js:405:12 at Array.every (<anonymous>) at rowFilter (packages/node_modules/pouchdb-selector-core/lib/index.js:397:25) at packages/node_modules/pouchdb-selector-core/lib/index.js:374:12 at Array.filter (<anonymous>) at Object.filterInMemoryFields (packages/node_modules/pouchdb-selector-core/lib/index.js:373:15) at packages/node_modules/pouchdb-find/lib/index.js:1454:40 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
{ "ok": true, "id": "1", "rev": "1-d092ffa43b2c0bde2d792bf5d6570a2c"}{ "docs": [], "bookmark": "nil", "warning": "No matching index found, create an index to optimize query time."}
The text was updated successfully, but these errors were encountered:
Error when selecting array against
null
value:Probably same root cause as in #8898
With CouchDB 3.1.2 (same used in GH CI workflows):
Output:
The text was updated successfully, but these errors were encountered: