diff options
author | Mario <mario@mariovavti.com> | 2023-09-21 09:14:15 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-09-21 09:14:15 +0000 |
commit | 1ced89a869483e693540129df64efd4411a50058 (patch) | |
tree | 45ceebb632025063965b785c215bb3051a2e73a3 /view/js/main.js | |
parent | a5e32dc3de997c3a3d9046161ce1ec149abb65c1 (diff) | |
download | volse-hubzilla-1ced89a869483e693540129df64efd4411a50058.tar.gz volse-hubzilla-1ced89a869483e693540129df64efd4411a50058.tar.bz2 volse-hubzilla-1ced89a869483e693540129df64efd4411a50058.zip |
fix javascript error
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js index ced1a517e..d022ee4a9 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1584,7 +1584,7 @@ function zFormError(elm,x) { $(window).scroll(function () { if(typeof buildCmd == 'function') { // This is a content page with items and/or conversations - if($(window).scrollTop() + $(window).height() > $('#conversation-end').position().top) { + if($('#conversation-end').length && ($(window).scrollTop() + $(window).height()) > $('#conversation-end').position().top) { if((pageHasMoreContent) && (! loadingPage)) { next_page++; scroll_next = true; @@ -1595,7 +1595,7 @@ $(window).scroll(function () { } else { // This is some other kind of page - perhaps a directory - if($('#page-end').length && ($(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; |