Skip to content

Commit 31e1eb2

Browse files
gaearonryanflorence
authored andcommitted
[fixed] supportsHistory false negatives on WP 8.1
1 parent 2be7e54 commit 31e1eb2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/utils/supportsHistory.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ function supportsHistory() {
22
/*! taken from modernizr
33
* https://github.com/Modernizr/Modernizr/blob/master/LICENSE
44
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
5+
* changed to avoid false negatives for Windows Phones: https://github.com/rackt/react-router/issues/586
56
*/
67
var ua = navigator.userAgent;
78
if ((ua.indexOf('Android 2.') !== -1 ||
89
(ua.indexOf('Android 4.0') !== -1)) &&
910
ua.indexOf('Mobile Safari') !== -1 &&
10-
ua.indexOf('Chrome') === -1) {
11+
ua.indexOf('Chrome') === -1 &&
12+
ua.indexOf('Windows Phone') === -1) {
1113
return false;
1214
}
1315
return (window.history && 'pushState' in window.history);

0 commit comments

Comments
 (0)