From 6d02f62d25ecd1b5def427bb53d1f3324a3a215c Mon Sep 17 00:00:00 2001 From: sergesemashko Date: Sun, 3 Apr 2016 21:43:23 -0400 Subject: [PATCH] - placed removeEventListener to be called on componentWillUnmount() --- src/LogMonitor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LogMonitor.js b/src/LogMonitor.js index 66e4e38..8700961 100644 --- a/src/LogMonitor.js +++ b/src/LogMonitor.js @@ -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); } }