about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-12-12 17:00:31 +0100
committerThibG <thib@sitedethib.com>2018-12-13 15:00:36 +0100
commit1e656c36322f4f941b8d432243454c16273d25b6 (patch)
tree86c18dca5b6952adb4f4ff0bf7a517483e9bd450 /app/javascript/flavours/glitch/features
parent2d097c10d008780c56798c444ae4d18414310bdb (diff)
[Glitch] Fix “load more” button when no data has been fetched
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r--app/javascript/flavours/glitch/features/account_gallery/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/account_gallery/index.js b/app/javascript/flavours/glitch/features/account_gallery/index.js
index a77db1c1b..3f61af0e8 100644
--- a/app/javascript/flavours/glitch/features/account_gallery/index.js
+++ b/app/javascript/flavours/glitch/features/account_gallery/index.js
@@ -67,7 +67,7 @@ export default class AccountGallery extends ImmutablePureComponent {
 
   handleScrollToBottom = () => {
     if (this.props.hasMore) {
-      this.handleLoadMore(this.props.medias.last().getIn(['status', 'id']));
+      this.handleLoadMore(this.props.medias.size > 0 ? this.props.medias.last().getIn(['status', 'id']) : undefined);
     }
   }