cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [1/2] js commit: CB-6863 - Default Cordova bridge broken due to replacing window.navigator (iOS 8)
Date Thu, 05 Jun 2014 21:28:26 GMT
Repository: cordova-js
Updated Branches:
  refs/heads/master bf2d55eb4 -> cf51b9171


CB-6863 - Default Cordova bridge broken due to replacing window.navigator (iOS 8)


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/2ae3caa1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/2ae3caa1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/2ae3caa1

Branch: refs/heads/master
Commit: 2ae3caa1c81c894d9544f71d9e09d0573090c90e
Parents: d970db7
Author: Shazron Abdullah <shazron@apache.org>
Authored: Thu Jun 5 14:27:10 2014 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Thu Jun 5 14:27:10 2014 -0700

----------------------------------------------------------------------
 src/ios/exec.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/2ae3caa1/src/ios/exec.js
----------------------------------------------------------------------
diff --git a/src/ios/exec.js b/src/ios/exec.js
index 4855d5c..4206e4b 100644
--- a/src/ios/exec.js
+++ b/src/ios/exec.js
@@ -134,9 +134,13 @@ function iOSExec() {
     // Use IFRAME_NAV elsewhere since it's faster and XHR bridge
     // seems to have bugs in newer OS's (CB-3900, CB-3359, CB-5457, CB-4970, CB-4998, CB-5134)
     if (bridgeMode === undefined) {
-        bridgeMode = navigator.userAgent.indexOf(' 5_') == -1 ? jsToNativeModes.IFRAME_NAV:
jsToNativeModes.XHR_NO_PAYLOAD;
+        if (navigator.userAgent) {
+            bridgeMode = navigator.userAgent.indexOf(' 5_') == -1 ? jsToNativeModes.IFRAME_NAV:
jsToNativeModes.XHR_NO_PAYLOAD;
+		} else {
+            bridgeMode = jsToNativeModes.IFRAME_NAV;
+        }
     }
-
+    
     var successCallback, failCallback, service, action, actionArgs, splitCommand;
     var callbackId = null;
     if (typeof arguments[0] !== "string") {


Mime
View raw message