Skip to content

Commit fbe015d

Browse files
Fix for iOS webview matching.
1 parent dc07788 commit fbe015d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/express-useragent.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,9 @@
10721072
* boolean flag `isiOSStandalone`, `isiOSUiwebview` and `isAndroidWebview` will be set as side effect.
10731073
*/
10741074
UserAgent.prototype.testWebview = function() {
1075-
if (this.Agent.os === 'iOS' && isBrowser) {
1075+
var isiOS = ['iOS', 'OS X'].indexOf(this.Agent.os) !== -1 || (this.Agent.isiPad || this.Agent.isiPod || this.Agent.isiPhone);
1076+
1077+
if (isiOS && isBrowser) {
10761078
if (window.navigator.standalone && !this.Agent.isSafari) {
10771079
this.Agent.isiOSStandalone = true;
10781080
} else if (!window.navigator.standalone && !this.Agent.isSafari) {

0 commit comments

Comments
 (0)