From 73ee38f485b5a61c0d1adbf10315789e4abc67a4 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 12 Dec 2018 18:04:10 +0100 Subject: [PATCH] [Glitch] Do not display empty message when the list is known to have more elements --- app/javascript/flavours/glitch/components/scrollable_list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/components/scrollable_list.js b/app/javascript/flavours/glitch/components/scrollable_list.js index 06d8ecd42f..bd922462e9 100644 --- a/app/javascript/flavours/glitch/components/scrollable_list.js +++ b/app/javascript/flavours/glitch/components/scrollable_list.js @@ -164,7 +164,7 @@ export default class ScrollableList extends PureComponent { const { fullscreen } = this.state; const childrenCount = React.Children.count(children); - const loadMore = (hasMore && childrenCount > 0 && onLoadMore) ? : null; + const loadMore = (hasMore && onLoadMore) ? : null; let scrollableArea = null; if (showLoading) { @@ -179,7 +179,7 @@ export default class ScrollableList extends PureComponent { ); - } else if (isLoading || childrenCount > 0 || !emptyMessage) { + } else if (isLoading || childrenCount > 0 || hasMore || !emptyMessage) { scrollableArea = (