diff --git a/dist/InfiniteScroll.js b/dist/InfiniteScroll.js index 6a7e623..1276afe 100644 --- a/dist/InfiniteScroll.js +++ b/dist/InfiniteScroll.js @@ -156,7 +156,7 @@ var InfiniteScroll = (function(_Component) { this.scrollListener, this.props.useCapture, ); - scrollEl.removeEventListener( + window.removeEventListener( 'resize', this.scrollListener, this.props.useCapture, @@ -185,7 +185,7 @@ var InfiniteScroll = (function(_Component) { this.scrollListener, this.props.useCapture, ); - scrollEl.addEventListener( + window.addEventListener( 'resize', this.scrollListener, this.props.useCapture, diff --git a/src/InfiniteScroll.js b/src/InfiniteScroll.js index b94c8e4..9eca90c 100644 --- a/src/InfiniteScroll.js +++ b/src/InfiniteScroll.js @@ -80,7 +80,7 @@ export default class InfiniteScroll extends Component { this.scrollListener, this.props.useCapture, ); - scrollEl.removeEventListener( + window.removeEventListener( 'resize', this.scrollListener, this.props.useCapture, @@ -107,7 +107,7 @@ export default class InfiniteScroll extends Component { this.scrollListener, this.props.useCapture, ); - scrollEl.addEventListener( + window.addEventListener( 'resize', this.scrollListener, this.props.useCapture,