diff --git a/src/index.js b/src/index.js index fac1bf0..6e342f0 100644 --- a/src/index.js +++ b/src/index.js @@ -47,6 +47,8 @@ export function syncHistory(history) { let unsubscribeHistory, currentKey, unsubscribeStore let connected = false, syncing = false + history.listen(location => { initialState.location = location })() + function middleware(store) { setTimeout(() => { unsubscribeHistory = history.listen(location => {