Skip to content

Commit

Permalink
Fixes #4070 because Windows Phone reports itself as being "Mozilla/5.…
Browse files Browse the repository at this point in the history
…0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 735) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537" which means Android is picked before "windows phone"
  • Loading branch information
Phil Hannent committed Oct 20, 2015
1 parent 6101d4b commit 76189f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/utils/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,12 @@
platformName = n.toLowerCase();
} else if (getParameterByName('ionicplatform')) {
platformName = getParameterByName('ionicplatform');
} else if (self.ua.indexOf('Windows Phone') > -1) {
platformName = WINDOWS_PHONE;
} else if (self.ua.indexOf('Android') > 0) {
platformName = ANDROID;
} else if (/iPhone|iPad|iPod/.test(self.ua)) {
platformName = IOS;
} else if (self.ua.indexOf('Windows Phone') > -1) {
platformName = WINDOWS_PHONE;
} else {
platformName = self.navigator.platform && navigator.platform.toLowerCase().split(' ')[0] || '';
}
Expand Down

0 comments on commit 76189f4

Please sign in to comment.