Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Querying with like filter throws error if (indexed) field of any child isn't present #254

Open
appy-one opened this issue Sep 30, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@appy-one
Copy link
Owner

appy-one commented Sep 30, 2024

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

@appy-one appy-one added the bug Something isn't working label Sep 30, 2024
@appy-one appy-one self-assigned this Sep 30, 2024
@appy-one appy-one changed the title Querying with like filter throws error if field of any child isn't present Querying with like filter throws error if (indexed) field of any child isn't present Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant