Skip to content

Commit

Permalink
[fixed] supportsHistory false negatives on WP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored and ryanflorence committed Dec 15, 2014
1 parent 2be7e54 commit 31e1eb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/utils/supportsHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ function supportsHistory() {
/*! taken from modernizr
* https://github.com/Modernizr/Modernizr/blob/master/LICENSE
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
* changed to avoid false negatives for Windows Phones: https://github.com/rackt/react-router/issues/586
*/
var ua = navigator.userAgent;
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;
}
return (window.history && 'pushState' in window.history);
Expand Down

0 comments on commit 31e1eb2

Please sign in to comment.