From: Andrew Dolgov Date: Mon, 2 Feb 2009 12:58:24 +0000 (+0300) Subject: articles_callback: do not try to extract counters when transport.responseXML is MIA X-Git-Tag: 1.3.1~138 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d63170bff0493fc1108e7df1321c062adb9b5bc5;p=tt-rss.git articles_callback: do not try to extract counters when transport.responseXML is MIA --- diff --git a/viewfeed.js b/viewfeed.js index 6f018d19..fd811d7f 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -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(); + } } }