Skip to content

Commit

Permalink
Fix not scrolling to top on PUSH fixes #3770 #3249 (#3775)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews authored Jan 30, 2018
1 parent 9b98b68 commit d7dae32
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ class ScrollContext extends React.Component {
location: prevProps.location,
}

// The "scroll-behavior" package expects the "action" to be on the location
// object so let's copy it over.
location.action = history.action
this.scrollBehavior.updateScroll(prevRouterProps, { history, location })
}

Expand Down

0 comments on commit d7dae32

Please sign in to comment.