1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-14 02:35:55 +00:00

proper handling of failed sanity check in parse_counters + weird getAttribute workaround

This commit is contained in:
Andrew Dolgov
2005-12-22 13:51:12 +01:00
parent 59b7764387
commit 6043fb7e20
3 changed files with 28 additions and 12 deletions

View File

@@ -358,6 +358,11 @@ if (!xmlhttp_rpc && typeof XMLHttpRequest!='undefined') {
function parse_counters(reply, f_document, title_obj) {
try {
for (var l = 0; l < reply.childNodes.length; l++) {
if (!reply.childNodes[l] || !reply.childNodes[l].getAttribute) {
// where did this come from?
continue;
}
var id = reply.childNodes[l].getAttribute("id");
var t = reply.childNodes[l].getAttribute("type");
var ctr = reply.childNodes[l].getAttribute("counter");