Skip to content

Commit

Permalink
fix(gatsby): Fix argument order for onPreRouteUpdate (#30339)
Browse files Browse the repository at this point in the history
Co-authored-by: Grayson Hicks <graysonhicks@gmail.com>
Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
  • Loading branch information
3 people authored Apr 12, 2023
1 parent 792937c commit 1fd967b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/gatsby/cache-dir/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ class RouteUpdates extends React.Component {
onRouteUpdate(this.props.location, null)
}

shouldComponentUpdate(prevProps) {
if (compareLocationProps(prevProps.location, this.props.location)) {
onPreRouteUpdate(this.props.location, prevProps.location)
shouldComponentUpdate(nextProps) {
if (compareLocationProps(this.props.location, nextProps.location)) {
onPreRouteUpdate(nextProps.location, this.props.location)
return true
}
return false
Expand Down

0 comments on commit 1fd967b

Please sign in to comment.