From: Andrew Dolgov Date: Tue, 3 Feb 2009 18:28:30 +0000 (+0300) Subject: hideOrShowFeedsCategory: fix for offline feedlist X-Git-Tag: 1.3.1~123 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f4ce1f83d1f01fd06723279151f57e9e8dc9c535;p=tt-rss.git hideOrShowFeedsCategory: fix for offline feedlist --- diff --git a/functions.js b/functions.js index 2b0370d3..99ae1d43 100644 --- a/functions.js +++ b/functions.js @@ -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); + } } }