diff --git a/js/viewfeed.js b/js/viewfeed.js index 05b36f2bc..c38d9d555 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;