Skip to content

Commit 9b77f8b

Browse files
author
Jon Deibel
committed
Updated build
1 parent b8e8e60 commit 9b77f8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dist/InfiniteScroll.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ var InfiniteScroll = function (_Component) {
102102
if (this.props.isReverse) offset = parentNode.scrollTop;else offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight;
103103
}
104104

105-
if (offset < Number(this.props.threshold)) {
105+
// Here we make sure the element is visible as well as checking the offset
106+
if (offset < Number(this.props.threshold) && el.offsetParent !== null) {
106107
this.detachScrollListener();
107108
// Call loadMore after detachScrollListener to allow for non-async loadMore functions
108109
if (typeof this.props.loadMore == 'function') {

0 commit comments

Comments
 (0)