Skip to content

Commit c180904

Browse files
committed
Force HashChangeRouterEnvironment if now window.history is found
1 parent 8576317 commit c180904

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ var pattern = require('url-pattern');
66

77
function createRouter(component, environment) {
88

9+
if (window.history === undefined) {
10+
environment = HashChangeRouterEnvironment;
11+
}
12+
913
return React.createClass({
1014
mixins: [environment],
1115

0 commit comments

Comments
 (0)