From: Andrew Dolgov Date: Wed, 22 Sep 2010 10:10:39 +0000 (+0400) Subject: digest: only try to show feed loading indicator when feed is actually present on... X-Git-Tag: 1.5.0~435^2~1^2~2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b8a1b2ae945d4295971c72aad53fcf5841eb76c7;p=tt-rss.git digest: only try to show feed loading indicator when feed is actually present on screen --- diff --git a/digest.js b/digest.js index cb42633b..3fe85f68 100644 --- a/digest.js +++ b/digest.js @@ -253,11 +253,13 @@ function viewfeed(feed_id, offset, replace, no_effects, no_indicator, callback) console.log(query); - var img = $("F-" + feed_id).getElementsByTagName("IMG")[0]; + if ($("F-" + feed_id)) { + var img = $("F-" + feed_id).getElementsByTagName("IMG")[0]; - if (img && !no_indicator) { - img.setAttribute("orig_src", img.src); - img.src = 'images/indicator_tiny.gif'; + if (img && !no_indicator) { + img.setAttribute("orig_src", img.src); + img.src = 'images/indicator_tiny.gif'; + } } new Ajax.Request("backend.php", {