From: Andrew Dolgov Date: Tue, 4 Sep 2012 08:10:42 +0000 (+0400) Subject: correctHeadlinesOffset: check for elements to work on X-Git-Tag: 1.6.0~71 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e4f48f8621e4cbc4659cf95e9027d6d9b054f7a7;p=tt-rss.git correctHeadlinesOffset: check for elements to work on --- diff --git a/js/viewfeed.js b/js/viewfeed.js index 05b36f2b..c38d9d55 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -1793,6 +1793,8 @@ function correctHeadlinesOffset(id) { var container = $("headlines-frame"); var row = $("RROW-" + id); + if (!container || !row) return; + var viewport = container.offsetHeight; var rel_offset_top = row.offsetTop - container.scrollTop;