diff --git a/src/windows/PushPluginProxy.js b/src/windows/PushPluginProxy.js index 7c492b84e..ac04f39de 100644 --- a/src/windows/PushPluginProxy.js +++ b/src/windows/PushPluginProxy.js @@ -66,13 +66,13 @@ module.exports = { onSuccess(result, { keepCallback: true }); var context = cordova.require('cordova/platform').activationContext; - var launchArgs = context.args; + var launchArgs = context ? context.args : null; if (launchArgs) { //If present, app launched through push notification var result = { message: '' }; //Added to identify callback as notification type in the API result.launchArgs = launchArgs; result.additionalData = { coldstart: true }; onSuccess(result, { keepCallback: true }); - } + } }, function (error) { onFail(error); });