From d63170bff0493fc1108e7df1321c062adb9b5bc5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 2 Feb 2009 15:58:24 +0300 Subject: [PATCH] articles_callback: do not try to extract counters when transport.responseXML is MIA --- viewfeed.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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(); + } } } -- 2.39.5