Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WindowsPhone flagged as iOS #169

Merged
merged 1 commit into from
Oct 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
// set OS flags for platforms that have multiple browsers
if (!result.windowsphone && !result.msedge && (android || result.silk)) {
result.android = t
} else if (iosdevice) {
} else if (!result.windowsphone && !result.msedge && iosdevice) {
result[iosdevice] = t
result.ios = t
} else if (mac) {
Expand Down
3 changes: 2 additions & 1 deletion src/useragents.js
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,9 @@ 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)': {
, 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; Lumia 640 LTE) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537': {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a real UA string or you just added like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537 to the previous one?
In case when it's a real one we need to add a new test case, but don't change the previous one.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this one is a real one. The previous one was not complete, that's why I edit it instead of creating a new one.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yeah, I see. Thanks!

windowsphone: true
, webkit: true
, osversion: '8.1'
, msie: true
, version: '11.0'
Expand Down