From 86baa14acaf932222952e0c7d4fbd123cb257474 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 6 Apr 2013 13:01:34 +0400 Subject: [PATCH] check for headlines-spacer presence before querying infscroll on load --- js/viewfeed.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/viewfeed.js b/js/viewfeed.js index 77ec5ce0..108d27ea 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -212,8 +212,8 @@ function headlines_callback2(transport, offset, background, infscroll_req) { // if we have some more space in the buffer, why not try to fill it - if (!_infscroll_disable && $("headlines-spacer").offsetTop < - $("headlines-frame").offsetHeight) { + if (!_infscroll_disable && $("headlines-spacer") && + $("headlines-spacer").offsetTop < $("headlines-frame").offsetHeight) { window.setTimeout(function() { loadMoreHeadlines(); -- 2.39.5