Skip to content

Commit

Permalink
fix($prevLocation): set correct prevLocation on client that has SSR
Browse files Browse the repository at this point in the history
  • Loading branch information
faceyspacey committed Jun 25, 2017
1 parent e67ba6a commit a30eb58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/connectRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,11 @@ export default (

store.dispatch(action)
}
else {
// set correct prevLocation on client that has SSR so that it will be
// assigned to `action.meta.location.prev` and the corresponding state
prevLocation = location
}

// update the scroll position after initial rendering of page
setTimeout(() => _updateScroll(false))
Expand Down

0 comments on commit a30eb58

Please sign in to comment.