From: Andrew Dolgov Date: Wed, 28 May 2008 08:43:17 +0000 (+0100) Subject: add some additional checks on child.id attributes being present in CDM auxilary functions X-Git-Tag: 1.2.24~15 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=028959411c0bc20dacaf09d9c9b47c4eb4c7f975;p=tt-rss.git add some additional checks on child.id attributes being present in CDM auxilary functions --- diff --git a/viewfeed.js b/viewfeed.js index 9890ac23..05639dbc 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -1000,7 +1000,7 @@ function cdmGetSelectedArticles() { for (i = 0; i < container.childNodes.length; i++) { var child = container.childNodes[i]; - if (child.id.match("RROW-") && child.className.match("Selected")) { + if (child.id && child.id.match("RROW-") && child.className.match("Selected")) { var c_id = child.id.replace("RROW-", ""); sel_articles.push(c_id); } @@ -1018,7 +1018,7 @@ function cdmGetVisibleArticles() { for (i = 0; i < container.childNodes.length; i++) { var child = container.childNodes[i]; - if (child.id.match("RROW-")) { + if (child.id && child.id.match("RROW-")) { var c_id = child.id.replace("RROW-", ""); sel_articles.push(c_id); } @@ -1034,7 +1034,7 @@ function cdmGetUnreadArticles() { for (i = 0; i < container.childNodes.length; i++) { var child = container.childNodes[i]; - if (child.id.match("RROW-") && child.className.match("Unread")) { + if (child.id && child.id.match("RROW-") && child.className.match("Unread")) { var c_id = child.id.replace("RROW-", ""); sel_articles.push(c_id); } @@ -1051,7 +1051,7 @@ function cdmSelectArticles(mode) { for (i = 0; i < container.childNodes.length; i++) { var child = container.childNodes[i]; - if (child.id.match("RROW-")) { + if (child.id && child.id.match("RROW-")) { var aid = child.id.replace("RROW-", ""); var cb = document.getElementById("RCHK-" + aid);