]> git.wh0rd.org Git - tt-rss.git/commitdiff
articles_callback: do not try to extract counters when transport.responseXML is MIA
authorAndrew Dolgov <fox@bah.org.ru>
Mon, 2 Feb 2009 12:58:24 +0000 (15:58 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Mon, 2 Feb 2009 12:58:24 +0000 (15:58 +0300)
viewfeed.js

index 6f018d19ca2e079206047ef3f0033eab83d7e697..fd811d7f595b22260faa0f7241d4adbfbc1ef998 100644 (file)
@@ -362,14 +362,16 @@ function article_callback2(transport, id, feed_id) {
                        setTimeout('updateFeedList(false, false)', 50);                 
                        _reload_feedlist_after_view = false;
                } else {
-                       var counters = transport.responseXML.getElementsByTagName("counters")[0];
+                       if (transport.responseXML) {
+                               var counters = transport.responseXML.getElementsByTagName("counters")[0];
 
-                       if (counters) {
-                               debug("parsing piggybacked counters: " + counters);
-                               parse_counters(counters, false);
-                       } else {
-                               debug("counters container not found in reply, requesting...");
-                               request_counters();
+                               if (counters) {
+                                       debug("parsing piggybacked counters: " + counters);
+                                       parse_counters(counters, false);
+                               } else {
+                                       debug("counters container not found in reply, requesting...");
+                                       request_counters();
+                               }
                        }
                }