From 151c8cd97aa71742798e969dd9e6c2208b8c1f15 Mon Sep 17 00:00:00 2001 From: Tomas Varga Date: Sun, 7 Aug 2016 05:11:32 +0200 Subject: [PATCH] [Windows] Added a check on activation context existence (#1129) --- src/windows/PushPluginProxy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); });