moveToPost: check for current article element existing before getting its position info (closes #695)

This commit is contained in:
Andrew Dolgov 2013-05-27 22:11:20 +04:00
parent 14c84904fe
commit 2a7362596f

View file

@ -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);