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

Commit 3f68d96

Browse files
committed
Always push path on initial route
1 parent 9872fff commit 3f68d96

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ function syncReduxAndRouter(history, store, selectRouterState = SELECT_STATE) {
105105
// trigger an unnecessary `pushState` on load
106106
lastRoute = initialState;
107107

108-
const method = location.action === 'REPLACE' ? replacePath : pushPath;
109-
store.dispatch(method(route.path, route.state, { avoidRouterUpdate: true }));
108+
store.dispatch(pushPath(route.path, route.state, { avoidRouterUpdate: true }));
110109
} else if(!locationsAreEqual(getRouterState(), route)) {
111110
// The above check avoids dispatching an action if the store is
112111
// already up-to-date

0 commit comments

Comments
 (0)