summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJeffrey Tolar <[email protected]>2013-06-21 23:49:35 -0500
committerJeffrey Tolar <[email protected]>2013-06-21 23:49:35 -0500
commit3b2605a02e63b20d5b0d2bc388daba9a22b68422 (patch)
treeb17b03aae6202ca7aa6d50fcf7e81308f49a241b /js
parent055a37e083c9b18bf027cafa724478acd01cae41 (diff)
Add some checks to see if the content element exists
This *might* help dismissal not break when not using combined mode.
Diffstat (limited to 'js')
-rw-r--r--js/viewfeed.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/js/viewfeed.js b/js/viewfeed.js
index 7182ec084..84230f61a 100644
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -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]);
}