diff --git a/src/InfiniteScroll.js b/src/InfiniteScroll.js index 332f7bd..aabb82e 100644 --- a/src/InfiniteScroll.js +++ b/src/InfiniteScroll.js @@ -126,7 +126,7 @@ export default class InfiniteScroll extends Component { this.scrollListener, this.options ? this.options : this.props.useCapture ); - scrollEl.removeEventListener( + window.removeEventListener( 'resize', this.scrollListener, this.options ? this.options : this.props.useCapture @@ -168,7 +168,7 @@ export default class InfiniteScroll extends Component { this.scrollListener, this.options ? this.options : this.props.useCapture ); - scrollEl.addEventListener( + window.addEventListener( 'resize', this.scrollListener, this.options ? this.options : this.props.useCapture