]> cat aescling's git repositories - mastodon.git/commitdiff
Fix unnecessary loadMore calls when the end of a timeline has been reached (#9581)
authorThibG <thib@sitedethib.com>
Wed, 19 Dec 2018 21:23:16 +0000 (22:23 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 19 Dec 2018 21:23:16 +0000 (22:23 +0100)
Fixes #9568

app/javascript/mastodon/components/scrollable_list.js

index 774c8835da10a5d2235bda8eb9bae022381ac9c4..fec06e26373357cd6002176c4860af2a693a69fc 100644 (file)
@@ -49,7 +49,7 @@ export default class ScrollableList extends PureComponent {
       const { scrollTop, scrollHeight, clientHeight } = this.node;
       const offset = scrollHeight - scrollTop - clientHeight;
 
-      if (400 > offset && this.props.onLoadMore && !this.props.isLoading) {
+      if (400 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
         this.props.onLoadMore();
       }