From: Andrew Dolgov Date: Mon, 27 May 2013 18:11:20 +0000 (+0400) Subject: moveToPost: check for current article element existing before getting its position... X-Git-Tag: 1.8~61 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=2a7362596f5ffcf6c5fad98f0e188eb3e9c2d466;p=tt-rss.git moveToPost: check for current article element existing before getting its position info (closes #695) --- diff --git a/js/viewfeed.js b/js/viewfeed.js index 095bfab2..005e0758 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -590,7 +590,7 @@ function moveToPost(mode, noscroll, noexpand) { if (!getInitParam("cdm_expanded")) { - if (!noscroll && article.offsetTop < ctr.scrollTop) { + if (!noscroll && article && article.offsetTop < ctr.scrollTop) { scrollArticle(-ctr.offsetHeight/4); } else { cdmExpandArticle(prev_id, noexpand);