summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-08-12 18:14:33 +0100
committerAndrew Dolgov <[email protected]>2006-08-12 18:14:33 +0100
commitb31c23117aca8b3a719d70e00dbc318465563a33 (patch)
tree640ca4099f3b56f0e5836fd7c91e8fbbb7ce8346 /functions.js
parent4407ebbe41eb017d095efa029122b33982c1a7e5 (diff)
possible fix for hideOrShowFeedCategory IE7 bug
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js37
1 files changed, 22 insertions, 15 deletions
diff --git a/functions.js b/functions.js
index e09b9c13b..ec129aeb1 100644
--- a/functions.js
+++ b/functions.js
@@ -775,26 +775,33 @@ function hideOrShowFeedsCategory(doc, node, hide, cat_node) {
for (i = 0; i < node.childNodes.length; i++) {
if (node.childNodes[i].nodeName != "LI") { continue; }
- var has_unread = (node.childNodes[i].className != "feed");
+ if (node.childNodes[i].style != undefined) {
-// debug(node.childNodes[i].id + " --> " + has_unread);
-
- if (hide && !has_unread) {
- node.childNodes[i].style.display = "none";
- }
-
- if (!hide) {
- node.childNodes[i].style.display = "list-item";
- }
-
- if (has_unread) {
- cat_unread++;
+ var has_unread = (node.childNodes[i].className != "feed");
+
+ // debug(node.childNodes[i].id + " --> " + has_unread);
+
+ if (hide && !has_unread) {
+ node.childNodes[i].style.display = "none";
+ }
+
+ if (!hide) {
+ node.childNodes[i].style.display = "list-item";
+ }
+
+ if (has_unread) {
+ cat_unread++;
+ }
}
-
}
- }
+ }
if (cat_unread == 0) {
+ if (cat_node.style == undefined) {
+ debug("ERROR: supplied cat_node " + cat_node +
+ " has no styles. WTF?");
+ return;
+ }
if (hide) {
cat_node.style.display = "none";
} else {