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

[Live Query] matchesKeyConstraints throwing error when constraints is {$ne : null} #8834

Open
RahulLanjewar93 opened this issue Dec 14, 2023 · 3 comments · May be fixed by #8835
Open

[Live Query] matchesKeyConstraints throwing error when constraints is {$ne : null} #8834

RahulLanjewar93 opened this issue Dec 14, 2023 · 3 comments · May be fixed by #8835

Comments

@RahulLanjewar93
Copy link

New Issue Checklist

Issue Description

matchesKeyConstraints function is not handling not equal to null constraint properly.
Due to which error is thrown `Cannot read properties of null (reading '__type')

image

Steps to reproduce

Create a subscription on a class with constraint notEqualTo(key,null)

Actual Outcome

Throws error.

Expected Outcome

Shouldn't throw an error.

Environment

18.19.0

Server

  • Parse Server version: 5.5.5
  • Operating system: Mac
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): self hosted

Database

  • System (MongoDB or Postgres): Mongo
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Local

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): Javascript
  • SDK version: 4.0.1

Logs

Copy link

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@RahulLanjewar93
Copy link
Author

@mtrezza i think we need some changes in the code block

QueryTools.js > matchesKeyConstraints

image

here we need to check if compareTo is not null/undefined

@RahulLanjewar93
Copy link
Author

@mtrezza please have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant