summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/js/views/endless_page_view.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/js/views/endless_page_view.js b/client/js/views/endless_page_view.js
index a4cb420..670d10c 100644
--- a/client/js/views/endless_page_view.js
+++ b/client/js/views/endless_page_view.js
@@ -136,7 +136,11 @@ class EndlessPageView {
if (this.totalRecords === null) {
return;
}
- const scrollThreshold = this._topPageNode.scrollHeight * 0.2;
+
+ let scrollThreshold = screen.innerHeight * 0.2;
+ if (this._topPageNode) {
+ scrollThreshold = this._topPageNode.scrollHeight * 0.2;
+ }
if (this.minOffsetShown > 0 && window.scrollY < scrollThreshold) {
this._loadPage(