Skip to content

Commit 72b7d2d

Browse files
add windows phone to patform
1 parent 8753619 commit 72b7d2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Browser/Browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var parse = function(ua, platform){
3232
UA[1] = 'chrome';
3333
}
3434

35-
platform = ua.match(/ip(?:ad|od|hone)/) ? 'ios' : (ua.match(/(?:webos|android)/) || platform.match(/mac|win|linux/) || ['other'])[0];
35+
platform = ua.indexOf('windows phone') != -1 ? 'windowsmobile' : ua.match(/ip(?:ad|od|hone)/) ? 'ios' : (ua.match(/(?:webos|android)/) || platform.match(/mac|win|linux/) || ['other'])[0];
3636
if (platform == 'win') platform = 'windows';
3737

3838
return {

0 commit comments

Comments
 (0)