]> git.wh0rd.org Git - tt-rss.git/commitdiff
add some additional checks on child.id attributes being present in CDM auxilary functions
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 28 May 2008 08:43:17 +0000 (09:43 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 28 May 2008 08:43:17 +0000 (09:43 +0100)
viewfeed.js

index 9890ac233f0d24cb71637e36fac5ea0dd762c949..05639dbc32ca6833583dc7bd35fc0e4da331ef1c 100644 (file)
@@ -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);