parse-community / parse-community/parse-server

LiveQuery pointer comparison does not handle null

Open
#7,929 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Feature / Enhancement Checklist
Current Limitation

Current QueryTools.js implementation protects itself from undefined objects but not from null objects. By using Parse Dashboard, it happens to create nulls instead of undefineds.

Feature / Enhancement Description

Checking for undefined and null.
((typeof obj !== 'undefined') && obj !== null)

Example Use Case

Register a livequery with a comparison on a pointer, then put that pointer to null (by code or by dashboard)

Alternatives / Workarounds

Use unset?

3rd Party References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at QueryTools.js around line 204, where pointer comparison currently guards against undefined but not null. Reproduce the LiveQuery case where a pointer is set to null, then confirm the comparison handles both values without failing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.