From 2a7362596f5ffcf6c5fad98f0e188eb3e9c2d466 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 27 May 2013 22:11:20 +0400 Subject: [PATCH] moveToPost: check for current article element existing before getting its position info (closes #695) --- js/viewfeed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.2