Skip to content

Commit

Permalink
Fix unnecessary loadMore calls when the end of a timeline has been re…
Browse files Browse the repository at this point in the history
…ached (mastodon#9581)

Fixes mastodon#9568
  • Loading branch information
ClearlyClaire authored and hiyuki2578 committed Oct 2, 2019
1 parent fe9c5a1 commit bf7283f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/scrollable_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit bf7283f

Please sign in to comment.