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

Commit 2af7b28

Browse files
committed
Always push path on initial route
1 parent 2ed7ad8 commit 2af7b28

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
@@ -115,8 +115,7 @@ function syncReduxAndRouter(history, store, selectRouterState = SELECT_STATE) {
115115
// trigger an unnecessary `pushState` on load
116116
lastRoute = initialState
117117

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

0 commit comments

Comments
 (0)