Skip to content

Commit

Permalink
Merge pull request #1472 from gaearon/patch-1
Browse files Browse the repository at this point in the history
Update UA check to fix false negative on WP 8.1
  • Loading branch information
patrickkettner committed Dec 29, 2014
2 parents 7386e9c + b019015 commit a6ca9d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions feature-detects/history.js
Expand Up @@ -27,11 +27,12 @@ define(['Modernizr'], function( Modernizr ) {
var ua = navigator.userAgent;

// We only want Android 2 and 4.0, stock browser, and not Chrome which identifies
// itself as 'Mobile Safari' as well
// itself as 'Mobile Safari' as well, nor Windows Phone (issue #1471).
if ((ua.indexOf('Android 2.') !== -1 ||
(ua.indexOf('Android 4.0') !== -1)) &&
ua.indexOf('Mobile Safari') !== -1 &&
ua.indexOf('Chrome') === -1) {
ua.indexOf('Chrome') === -1 &&
ua.indexOf('Windows Phone') === -1) {
return false;
}

Expand Down

0 comments on commit a6ca9d9

Please sign in to comment.