[GH-ISSUE #254] Querying with like filter throws error if (indexed) field of any child isn't present #116

Open
opened 2026-05-23 08:31:10 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @appy-one on GitHub (Sep 30, 2024).
Original GitHub issue: https://github.com/appy-one/acebase/issues/254

Originally assigned to: @appy-one on GitHub.

Executing the following query will throw error Cannot read properties of undefined (reading 'toString') if there is an object in the queried collection that does not have a value for the filtered (and indexed) field with like:

const snaps = db.query('users').filter('email', 'like', 'ewout@*').get();

A single user in this collection that has no email field will cause the query to crash

Originally created by @appy-one on GitHub (Sep 30, 2024). Original GitHub issue: https://github.com/appy-one/acebase/issues/254 Originally assigned to: @appy-one on GitHub. Executing the following query will throw error `Cannot read properties of undefined (reading 'toString')` if there is an object in the queried collection that does not have a value for the filtered (and indexed) field with `like`: ```typescript const snaps = db.query('users').filter('email', 'like', 'ewout@*').get(); ``` A single user in this collection that has no `email` field will cause the query to crash
gitea-mirror added the
bug
label 2026-05-23 08:31:10 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#116
No description provided.