Skip to content

Commit

Permalink
fix: update on scroll restoration (#939)
Browse files Browse the repository at this point in the history
  • Loading branch information
m99coder committed Nov 9, 2023
1 parent 66d8ec8 commit 1138740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Sticky.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class Sticky extends Component {
}

// check if we are up-to-date, is triggered in case of scroll restoration
if (this.props.top !== prevState.top) {
if (this.state.top !== prevState.top) {
this.updateInitialDimension();
this.update();
}
Expand Down

0 comments on commit 1138740

Please sign in to comment.