Skip to content

Commit f766ff4

Browse files
committed
Merge pull request #3301 from sloops77/master
feat(platform): recognize trigger.io as a webView platform
2 parents b2f8398 + 4a4afb8 commit f766ff4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/utils/platform.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@
150150

151151
if (self.isWebView()) {
152152
self.platforms.push('webview');
153-
self.platforms.push('cordova');
153+
if(!(!window.cordova && !window.PhoneGap && !window.phonegap)) {
154+
self.platforms.push('cordova');
155+
} else if(!!window.forge) {
156+
self.platforms.push('trigger');
157+
}
154158
} else {
155159
self.platforms.push('browser');
156160
}
@@ -188,7 +192,7 @@
188192
* @returns {boolean} Check if we are running within a WebView (such as Cordova).
189193
*/
190194
isWebView: function() {
191-
return !(!window.cordova && !window.PhoneGap && !window.phonegap);
195+
return !(!window.cordova && !window.PhoneGap && !window.phonegap && !window.forge);
192196
},
193197
/**
194198
* @ngdoc method

0 commit comments

Comments
 (0)