Skip to content

Commit

Permalink
fix the extras parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
iflamed committed Jan 17, 2017
1 parent da2a16f commit 0be2034
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/cordova-huawei-push.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ HuaweiPush.prototype.pushMsgReceived = function (msg) {
}
HuaweiPush.prototype.notificationOpened = function (msg) {
try {
this.receiveRegisterResult = JSON.parse(msg);
msg.extras = JSON.parse(msg.extras)
this.receiveRegisterResult = msg;
cordova.fireDocumentEvent('huaweipush.notificationOpened', this.receiveRegisterResult);
} catch(exception) {
console.log('HuaweiPush:notificationOpened ' + exception);
Expand Down

0 comments on commit 0be2034

Please sign in to comment.