]> git.wh0rd.org Git - tt-rss.git/commitdiff
correctHeadlinesOffset: check for elements to work on
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 4 Sep 2012 08:10:42 +0000 (12:10 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 4 Sep 2012 08:10:42 +0000 (12:10 +0400)
js/viewfeed.js

index 05b36f2bc8896c5227cd6bf80d495795852bebc5..c38d9d55530df0bd6929013adfe5a8c20a3a1657 100644 (file)
@@ -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;