Skip to content

Commit f2a7623

Browse files
committed
Check if the data is null when get platform arn
1 parent 780afbc commit f2a7623

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SNSPushAdapter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ SNSPushAdapter.prototype.exchangeTokenPromise = function (device, platformARN) {
173173
return new Parse.Promise((resolve, reject) => {
174174

175175
this.getPlatformArn(device, platformARN, (err, data) => {
176-
if (data.EndpointArn) {
176+
if (data !== null && data.EndpointArn) {
177177
resolve({device: device, arn: data.EndpointArn});
178178
}
179179
else

0 commit comments

Comments
 (0)