From 9f31efa62fed0aaecd445f4efc4d73f0a8e239a0 Mon Sep 17 00:00:00 2001 From: Benoit de La Forest Date: Fri, 28 Oct 2016 13:01:55 +0200 Subject: [PATCH] Fix WindowsPhone flagged as iOS Related to !168 --- src/bowser.js | 2 +- src/useragents.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bowser.js b/src/bowser.js index fcffbcd..d13577c 100644 --- a/src/bowser.js +++ b/src/bowser.js @@ -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) { diff --git a/src/useragents.js b/src/useragents.js index b1855dd..4d2640d 100644 --- a/src/useragents.js +++ b/src/useragents.js @@ -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': { windowsphone: true + , webkit: true , osversion: '8.1' , msie: true , version: '11.0'