]> git.wh0rd.org Git - tt-rss.git/commitdiff
Add some checks to see if the content element exists
authorJeffrey Tolar <tolar.jeffrey@gmail.com>
Sat, 22 Jun 2013 04:49:35 +0000 (23:49 -0500)
committerJeffrey Tolar <tolar.jeffrey@gmail.com>
Sat, 22 Jun 2013 04:49:35 +0000 (23:49 -0500)
This *might* help dismissal not break when not using combined mode.

js/viewfeed.js

index 7182ec084027594330a8ae99b73060b3b5cd5e6a..84230f61a11cee5ab02ee56fde7963ce73df2cb1 100644 (file)
@@ -1613,7 +1613,9 @@ function dismissArticle(id) {
 
                // Remove the content, too
                var elem_content = $("CICD-" + id);
-               Element.remove(elem_content);
+               if (elem_content) {
+                       Element.remove(elem_content);
+               }
 
                if (id == getActiveArticleId()) {
                        setActiveArticleId(0);
@@ -1641,7 +1643,9 @@ function dismissSelectedArticles() {
 
                                // Remove the content, too
                                var elem_content = $("CICD-" + ids[i]);
-                               Element.remove(elem_content);
+                               if (elem_content) {
+                                       Element.remove(elem_content);
+                               }
                        } else {
                                tmp.push(ids[i]);
                        }
@@ -1672,7 +1676,9 @@ function dismissReadArticles() {
 
                                // Remove the content, too
                                var elem_content = $("CICD-" + ids[i]);
-                               Element.remove(elem_content);
+                               if (elem_content) {
+                                       Element.remove(elem_content);
+                               }
                        } else {
                                tmp.push(ids[i]);
                        }