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

Commit a00acfd

Browse files
committed
Set initial location state.
This handles Dev Tools resets better, as the INIT action will not have an empty location for initialState. Fixes #207
1 parent 1935164 commit a00acfd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export function syncHistory(history) {
4747
let unsubscribeHistory, currentKey, unsubscribeStore
4848
let connected = false, syncing = false
4949

50+
history.listen(location => { initialState.location = location })()
51+
5052
function middleware(store) {
5153
setTimeout(() => {
5254
unsubscribeHistory = history.listen(location => {

0 commit comments

Comments
 (0)