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

Checking if object has defined key for Pointer constraints in liveQuery #1487

Merged
merged 4 commits into from
Apr 14, 2016

Conversation

simonas-notcat
Copy link
Contributor

If there is a liveQuery subscription, with Pointer type constrains (e.g.
query.equalTo('user', Parse.User.current())), and new object has
undefined value for that field, we get this error:

error: Uncaught internal server error. [TypeError: Cannot read
property 'className' of undefined] TypeError: Cannot read property
'className' of undefined
at matchesKeyConstraints
(…/node_modules/parse-server/lib/LiveQuery/QueryTools.js:145:51)

…uery

This bug caused sessionToken to be replaced on client side to some old
sessionToken from DB.
If there is a liveQuery subscription, with Pointer type constrains (e.g
query.equalTo('user', Parse.User.current())), and new object has
undefined value for that field, we get this error:

    error: Uncaught internal server error. [TypeError: Cannot read
property 'className' of undefined] TypeError: Cannot read property
'className' of undefined
    at matchesKeyConstraints
(…/node_modules/parse-server/lib/LiveQuery/QueryTools.js:145:51)
@codecov-io
Copy link

Current coverage is 92.87%

Merging #1487 into master will increase coverage by +0.01% as of 5f0a6e5

@@            master   #1487   diff @@
======================================
  Files           87      87       
  Stmts         5491    5491       
  Branches      1015    1015       
  Methods          0       0       
======================================
+ Hit           5099    5100     +1
  Partial         10      10       
+ Missed         382     381     -1

Review entire Coverage Diff as of 5f0a6e5

Powered by Codecov. Updated on successful CI builds.

@flovilmart
Copy link
Contributor

@simonas-notcat weren't 2 of the 3 commits already merged?

@facebook-github-bot
Copy link

@simonas-notcat updated the pull request.

@flovilmart flovilmart merged commit 686cc4a into parse-community:master Apr 14, 2016
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 this pull request may close these issues.

4 participants