summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-05-27 22:11:20 +0400
committerAndrew Dolgov <[email protected]>2013-05-27 22:11:20 +0400
commit2a7362596f5ffcf6c5fad98f0e188eb3e9c2d466 (patch)
tree1a3d78d4b8779eadf9ad472cd4e51e2aafeeb23d
parent14c84904fe8541a7ad4a91abfe28086f2ffde7c2 (diff)
moveToPost: check for current article element existing before getting its position info (closes #695)
-rw-r--r--js/viewfeed.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/viewfeed.js b/js/viewfeed.js
index 095bfab22..005e0758c 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);