Skip to content

Commit

Permalink
Fix not scrolling to top on PUSH fixes #3770 #3249
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Jan 30, 2018
1 parent a89057f commit 47ef6bf
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 47ef6bf

Please sign in to comment.