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

fix: remove serializer check from Query.isEqual() #1654

Merged
merged 5 commits into from
Jan 7, 2022
Merged

Conversation

thebrianchen
Copy link

Fixes #1652.

The existing Query.isEqual() method incorrectly returns false when two different collection objects pointing to the same collection id with the same filters are compared. This was because of the underlying deep-equals implementation checking for arrow functions in the FieldFilter class.

This change adds an isEqual() implementation for FieldFilter that does not check the serializer.

@thebrianchen thebrianchen requested review from a team as code owners January 5, 2022 19:18
@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/nodejs-firestore API. label Jan 5, 2022
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@thebrianchen thebrianchen merged commit f13da18 into main Jan 7, 2022
@thebrianchen thebrianchen deleted the bc/query-equals branch January 7, 2022 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

isEqual() not working correctly for Queries
2 participants