Skip to content

Commit

Permalink
use history.push instead of history.pushState
Browse files Browse the repository at this point in the history
  • Loading branch information
gaboesquivel committed Dec 7, 2015
1 parent 3545a3e commit 803169c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Expand Up @@ -115,7 +115,7 @@ function syncReduxAndRouter(history, store, selectRouterState = SELECT_STATE) {
};

// Also set `lastRoute` so that the store subscriber doesn't
// trigger an unnecessary `pushState` on load
// trigger an unnecessary `history.push` on load
lastRoute = initialState;

store.dispatch(initPath(route.path, route.state));
Expand All @@ -136,7 +136,7 @@ function syncReduxAndRouter(history, store, selectRouterState = SELECT_STATE) {
!locationsAreEqual(lastRoute, routing)) {

lastRoute = routing;
const method = routing.replace ? 'replaceState' : 'pushState';
const method = routing.replace ? 'replaceState' : 'push';
history[method](routing.state, routing.path);
}

Expand Down

0 comments on commit 803169c

Please sign in to comment.