check for headlines-spacer presence before querying infscroll on load

This commit is contained in:
Andrew Dolgov 2013-04-06 13:01:34 +04:00
parent 2b28c8f2da
commit 86baa14aca
1 changed files with 2 additions and 2 deletions

View File

@ -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();