]> git.wh0rd.org Git - tt-rss.git/commitdiff
digest: only try to show feed loading indicator when feed is actually present on...
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 22 Sep 2010 10:10:39 +0000 (14:10 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 22 Sep 2010 10:10:39 +0000 (14:10 +0400)
digest.js

index cb42633b6111ffd496856535ef1f1e0d72079dee..3fe85f68ea4fa32338062302e2eab860d83eee8b 100644 (file)
--- 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", {