Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

use history.push instead of history.pushState #85

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
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