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

Commit a985b5b

Browse files
committed
Always push path on initial route
1 parent a1d778e commit a985b5b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ export function syncReduxAndRouter(history, store, selectRouterState = SELECT_ST
113113
// trigger an unnecessary `pushState` on load
114114
lastRoute = initialState
115115

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

0 commit comments

Comments
 (0)