fix CommonAPI Javascript bridge detection
@@ -962,7 +962,8 @@ var Rho = Rho || (function ($) {
WP8: 'wp8',
UWP: 'uwp',
WM: 'wm',
- WIN32: 'win32'
+ WIN32: 'win32',
+ SAILFISH: 'sailfish'
},
nativeApiCall: nativeApiCall_ajax,
nativeApiResult: function(){/* intentionally empty stub function */}
@@ -1153,8 +1154,14 @@ if (typeof(qt) == "undefined"){
rhoPlatform.nativeApiCall = function() {
// use forced bridge type value in case it defined,
// otherwise use auto-detected bridge type
- var platformBridge = bridges[window[rhoUtil.flag.NATIVE_BRIDGE_TYPE]] || detectedPlatformBridge;
+ var platformBridge = detectedPlatformBridge;
+ if (rhoUtil.flag.NATIVE_BRIDGE_TYPE in window) {
+ var btype = window[rhoUtil.flag.NATIVE_BRIDGE_TYPE];
+ if (btype in bridges) {
+ platformBridge = bridges[btype];
+ }
+ }
platformBridge().apiCall.apply(this, arguments);
}
