moveToPost: check for current article element existing before getting its position info (closes #695)
This commit is contained in:
parent
14c84904fe
commit
2a7362596f
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue