You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistency between afterLiveQueryEvent "type" and SDK #7022
This example will never fire as .event is defined as:
let type;
if (isOriginalMatched && isCurrentMatched) {
type = 'Update'; // 'Update', not 'update'
} else if (isOriginalMatched && !isCurrentMatched) {
type = 'Leave';
} else if (!isOriginalMatched && isCurrentMatched) {
if (originalParseObject) {
type = 'Enter';
} else {
type = 'Create';
}
} else {
return null;
}
Describe the solution you'd like
Casing consistent across SDK and afterLiveQueryEvent, or at least documented that they are different.
I classified this as a bug with severity level 4 because:
this is an inconsistency with expectations that can be derived from related syntax in the Parse JS SDK
this is an inconsistency with the docs
the functionality itself is not impaired, albeit one would have to look into the source code to find the correct event spellings
The suggested solution would be to make the spelling consistent by changing it to lower case.
The bug was apparently introduced in #6859, parse-community/docs#773.
Would you be willing to open a PR?
We should also look at test cases that verify the correct spelling.
Agree with all the points you've raised. Only a minor nit that will cause inconvenience and confusion. Potentially breaking change for the next release though for those already utilising the trigger.
Activity
mtrezza commentedon Nov 24, 2020
Thanks for reporting.
I classified this as a bug with severity level 4 because:
The suggested solution would be to make the spelling consistent by changing it to lower case.
The bug was apparently introduced in #6859, parse-community/docs#773.
Would you be willing to open a PR?
We should also look at test cases that verify the correct spelling.
dblythy commentedon Nov 24, 2020
Agree with all the points you've raised. Only a minor nit that will cause inconvenience and confusion. Potentially breaking change for the next release though for those already utilising the trigger.
mtrezza commentedon Nov 24, 2020
Yes, given that this feature has only been introduced about 1 month ago, I would assume that the breaking change impact is not that big of a deal.