Skip to content

Commit

Permalink
fix windowsphone flagged as android
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit de La Forest committed Oct 27, 2016
1 parent 6f218f1 commit e44ca1d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
}

// set OS flags for platforms that have multiple browsers
if (!result.msedge && (android || result.silk)) {
if (!result.windowsphone && !result.msedge && (android || result.silk)) {
result.android = t
} else if (iosdevice) {
result[iosdevice] = t
Expand Down
8 changes: 8 additions & 0 deletions src/useragents.js
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,14 @@ module.exports.useragents = {
, mobile: true
, a: true
}
, 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; Lumia 535)': {
windowsphone: true
, osversion: '8.1'
, msie: true
, version: '11.0'
, mobile: true
, a: true
}
}
, WebOS: {
'Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.5; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.83 Safari/534.6 TouchPad/1.0': {
Expand Down

0 comments on commit e44ca1d

Please sign in to comment.