-
-
Notifications
You must be signed in to change notification settings - Fork 105
Fixed error when sending pushes to one pushType #6
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
Conversation
Added check for empty devices sets when sending push notifications to senders. This fixes and issue where the empty sets being processed by the senders would throw several reference errors.
Current coverage is
|
} | ||
if(devices.length > 0) | ||
{ | ||
if (!sender) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use spaces instead of tabs and length 2 instead of 4?
One small nit otherwise LGTM |
} else { | ||
sendPromises.push(sender.send(data, devices)); | ||
} | ||
if(devices.length > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use Array.isArray(devices) && devices.length > 0
instead? This way we'll completely eliminate any possible problems,
Replaced tabs with spaces Added array check for device set
Tabs have been replaced with spaces (length =2). And the |
Added check for empty devices sets when sending push notifications to
senders. This fixes and issue where the empty sets being processed by
the senders would throw several reference errors.
Fixes parse-community/parse-server#1245