]> git.wh0rd.org Git - tt-rss.git/commitdiff
hideOrShowFeedsCategory: fix for offline feedlist
authorAndrew Dolgov <fox@bah.org.ru>
Tue, 3 Feb 2009 18:28:30 +0000 (21:28 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Tue, 3 Feb 2009 18:28:30 +0000 (21:28 +0300)
functions.js

index 2b0370d395c3f0926df88d8197517759835ed0f4..99ae1d43041e584c923e91e571873d49cc7fa996 100644 (file)
@@ -854,25 +854,28 @@ function hideOrShowFeedsCategory(id, hide) {
                }       
        
        //      debug("end cat: " + node.id + " 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";
-                               Effect.Fade(cat_node, {duration : 0.3, 
-                                       queue: { position: 'end', scope: 'CFADE-' + node.id, limit: 1 }});
+
+               if (cat_node) {
+
+                       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";
+                                       Effect.Fade(cat_node, {duration : 0.3, 
+                                               queue: { position: 'end', scope: 'CFADE-' + node.id, limit: 1 }});
+                               } else {
+                                       cat_node.style.display = "list-item";
+                               }
                        } else {
-                               cat_node.style.display = "list-item";
-                       }
-               } else {
-                       try {
-                               cat_node.style.display = "list-item";
-                       } catch (e) {
-                               debug(e);
+                               try {
+                                       cat_node.style.display = "list-item";
+                               } catch (e) {
+                                       debug(e);
+                               }
                        }
                }