From 028959411c0bc20dacaf09d9c9b47c4eb4c7f975 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 28 May 2008 09:43:17 +0100 Subject: [PATCH] add some additional checks on child.id attributes being present in CDM auxilary functions --- viewfeed.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/viewfeed.js b/viewfeed.js index 9890ac233..05639dbc3 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);