about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components
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/components
parent2d097c10d008780c56798c444ae4d18414310bdb (diff)
[Glitch] Fix “load more” button when no data has been fetched
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r--app/javascript/flavours/glitch/components/status_list.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/status_list.js b/app/javascript/flavours/glitch/components/status_list.js
index 68cd608b9..5249af76d 100644
--- a/app/javascript/flavours/glitch/components/status_list.js
+++ b/app/javascript/flavours/glitch/components/status_list.js
@@ -55,7 +55,7 @@ export default class StatusList extends ImmutablePureComponent {
   }
 
   handleLoadOlder = debounce(() => {
-    this.props.onLoadMore(this.props.statusIds.last());
+    this.props.onLoadMore(this.props.statusIds.size > 0 ? this.props.statusIds.last() : undefined);
   }, 300, { leading: true })
 
   _selectChild (index) {