Skip to content

Commit

Permalink
Bind this to updateViewportOffsetTop correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-marcellini committed Aug 3, 2022
1 parent c6e9645 commit 9201c0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class ReportScreen extends React.Component {
super(props);

this.onSubmitComment = this.onSubmitComment.bind(this);
this.viewportOffsetTop = this.updateViewportOffsetTop.bind(this);
this.updateViewportOffsetTop = this.updateViewportOffsetTop.bind(this);
this.removeViewportResizeListener = () => {};

this.state = {
Expand All @@ -125,7 +125,7 @@ class ReportScreen extends React.Component {

componentDidMount() {
this.storeCurrentlyViewedReport();
this.removeViewportResizeListener = addViewportResizeListener(this.viewportOffsetTop);
this.removeViewportResizeListener = addViewportResizeListener(this.updateViewportOffsetTop);
}

componentDidUpdate(prevProps) {
Expand Down

0 comments on commit 9201c0f

Please sign in to comment.