From e4f48f8621e4cbc4659cf95e9027d6d9b054f7a7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 4 Sep 2012 12:10:42 +0400 Subject: [PATCH] correctHeadlinesOffset: check for elements to work on --- js/viewfeed.js | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.5