From bf7283f32ddc68048813c8804dcc037c9548f3f3 Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 19 Dec 2018 22:23:16 +0100 Subject: [PATCH] Fix unnecessary loadMore calls when the end of a timeline has been reached (#9581) Fixes #9568 --- app/javascript/mastodon/components/scrollable_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/components/scrollable_list.js b/app/javascript/mastodon/components/scrollable_list.js index 774c8835da10a5..fec06e26373357 100644 --- a/app/javascript/mastodon/components/scrollable_list.js +++ b/app/javascript/mastodon/components/scrollable_list.js @@ -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(); }