Skip to content

Commit

Permalink
Update index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhipawar5 authored May 9, 2024
1 parent ac0f873 commit e482024
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/next/src/client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ class Container extends React.Component<{
})
}
}


//Changes to be reviewed - To ensure that the component scrolls to the appropriate element even when the user navigates using the browser buttons
componentDidUpdate(prevProps) {
if (prevProps.location.hash !== this.props.location.hash) {
this.scrollToHash();
Expand Down

0 comments on commit e482024

Please sign in to comment.