You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sg...@apache.org on 2015/08/20 11:19:52 UTC

cordova-plugin-test-framework git commit: Ensure WinJS is available when adding Windows unhandled error hook

Repository: cordova-plugin-test-framework
Updated Branches:
  refs/heads/master b5812049a -> c0d6f6e96


Ensure WinJS is available when adding Windows unhandled error hook


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/commit/c0d6f6e9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/tree/c0d6f6e9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/diff/c0d6f6e9

Branch: refs/heads/master
Commit: c0d6f6e9679810905db7dd6d16c217e9edceb3e5
Parents: b581204
Author: sgrebnov <v-...@microsoft.com>
Authored: Thu Aug 20 12:19:57 2015 +0300
Committer: sgrebnov <v-...@microsoft.com>
Committed: Thu Aug 20 12:19:57 2015 +0300

----------------------------------------------------------------------
 www/main.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/blob/c0d6f6e9/www/main.js
----------------------------------------------------------------------
diff --git a/www/main.js b/www/main.js
index 78fe7d9..351db63 100644
--- a/www/main.js
+++ b/www/main.js
@@ -381,11 +381,11 @@ function runMain() {
       });
   }
 
-  if (cordova.platformId === "windows" || cordova.platformId === "windows8") {
+  if (cordova.platformId === "windows" && typeof WinJS !== 'undefined') {
     var app = WinJS.Application;
     app.addEventListener("error", function (err) {
         // We do not want an unhandled exception to crash the test app
-        // Retruning true marks it as being handled
+        // Returning true marks it as being handled
         return true;
       });
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org