aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-09-21 09:14:15 +0000
committerMario <mario@mariovavti.com>2023-09-21 09:14:15 +0000
commit1ced89a869483e693540129df64efd4411a50058 (patch)
tree45ceebb632025063965b785c215bb3051a2e73a3 /view/js/main.js
parenta5e32dc3de997c3a3d9046161ce1ec149abb65c1 (diff)
downloadvolse-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.js4
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;