aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-03-08 15:33:26 +0000
committerMario <mario@mariovavti.com>2021-03-09 12:14:38 +0100
commit011342ac1bd2670712a3415aa61b2e04e4f2c912 (patch)
treeee8bd575ac37e3eba26d0ac58a3517252676321d /view/js
parent5577383a48f333030471641faba3d4c05ec75265 (diff)
downloadvolse-hubzilla-011342ac1bd2670712a3415aa61b2e04e4f2c912.tar.gz
volse-hubzilla-011342ac1bd2670712a3415aa61b2e04e4f2c912.tar.bz2
volse-hubzilla-011342ac1bd2670712a3415aa61b2e04e4f2c912.zip
Fix undefined page end on non dynamic pages
(cherry picked from commit 182dec3e574a1db1f737b1ff2f4a6423a0911b1d)
Diffstat (limited to 'view/js')
-rw-r--r--view/js/main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 0c48c8b18..16dcd9cfe 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1574,7 +1574,7 @@ $(window).scroll(function () {
}
else {
// This is some other kind of page - perhaps a directory
- if($(window).scrollTop() + $(window).height() > $('#page-end').position().top) {
+ if($('#page-end').length && ($(window).scrollTop() + $(window).height() > $('#page-end').position().top)) {
if((pageHasMoreContent) && (! loadingPage) && (! justifiedGalleryActive)) {
next_page++;
scroll_next = true;