]> git.wh0rd.org Git - tt-rss.git/commitdiff
moveToPost: check for current article element existing before getting its position...
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 27 May 2013 18:11:20 +0000 (22:11 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 27 May 2013 18:11:20 +0000 (22:11 +0400)
js/viewfeed.js

index 095bfab22210ed11432744769c55f8b035a964b8..005e0758ca873e91229a543108ee064e36c17509 100644 (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);