Skip to content

Commit

Permalink
ISL-1318: i-ua: Windows Phone не определяется
Browse files Browse the repository at this point in the history
  • Loading branch information
baymer committed Jun 30, 2015
1 parent 3c65147 commit 6589f29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blocks-common/i-ua/i-ua.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
device = {},
match;

if (match = ua.match(/Android\s+([\d.]+)/)) {
if (match = ua.match(/Windows\sPhone[^\d]*\s([\d.]+)/)) {
platform.wp = match[1];
} else if (match = ua.match(/Android\s+([\d.]+)/)) {
platform.android = match[1];
} else if (ua.match(/\sHTC[\s_].*AppleWebKit/)) {
// фэйковый десктопный UA по умолчанию у некоторых HTC (например, HTC Sensation)
Expand All @@ -50,8 +52,6 @@
device.ipad = true;
} else if (match = ua.match(/Bada\/([\d.]+)/)) {
platform.bada = match[1];
} else if (match = ua.match(/Windows\sPhone[^\d]*\s([\d.]+)/)) {
platform.wp = match[1];
} else if (match = ua.match(/MSIE\s9/)) {
platform.wp = '7.5';
} else {
Expand Down

0 comments on commit 6589f29

Please sign in to comment.