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
Error when selecting array containing null against non-existing value:
it("should not throw",async()=>{constdb=context.db;awaitdb.put({_id: '1'});// FIXME: exception is thrown if document field not exists// and selector contains a null in an arrayconstresp=awaitdb.find({selector: {field: [null]}})resp.docs.should.have.length(0);});
TypeError: Cannot read properties of undefined (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)
With CouchDB 3.1.2 (same used in GH CI workflows):
{ "ok": true, "id": "1", "rev": "1-967a00dff5e02add41819138abb3284d"}{ "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:
SourceR85
changed the title
PouchDB find error: selector array containing null didn't match
PouchDB find error: selector array containing null didn't match
Mar 30, 2024
SourceR85
changed the title
PouchDB find error: selector array containing null didn't match
PouchDB find error: selector containing [null] throws by non-matching document
Mar 30, 2024
Error when selecting array containing
null
against non-existing value:With CouchDB 3.1.2 (same used in GH CI workflows):
Output:
The text was updated successfully, but these errors were encountered: