Skip to content

Commit

Permalink
- placed removeEventListener to be called on componentWillUnmount()
Browse files Browse the repository at this point in the history
  • Loading branch information
sergesemashko committed Apr 4, 2016
1 parent bab54da commit 6d02f62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LogMonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class LogMonitor extends Component {
componentWillUnmount() {
const node = this.refs.container;
if (node && this.props.preserveScrollTop) {
node.addEventListener('scroll', this.updateScrollTop);
node.removeEventListener('scroll', this.updateScrollTop);
}
}

Expand Down

0 comments on commit 6d02f62

Please sign in to comment.