Skip to content

Commit

Permalink
Fix autohide
Browse files Browse the repository at this point in the history
Fix `"Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the FreeScrollbar component."`

Due to un - `clearTimeout`
  • Loading branch information
bzemms authored Mar 11, 2018
1 parent 8ef4ad0 commit 925c5c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ export default class FreeScrollbar extends React.Component {
document.removeEventListener('mousemove', this.handleHandlerMouseMove);
document.removeEventListener('mouseup', this.handleHandlerMouseUp);
document.removeEventListener('readystatechange', this.handleReadyStateChange);

clearTimeout(this.handlerHider);
}

componentDidUpdate() {
Expand Down

0 comments on commit 925c5c5

Please sign in to comment.