diff options
author | Andrew Dolgov <[email protected]> | 2005-12-22 13:51:12 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-12-22 13:51:12 +0100 |
commit | 6043fb7e201b85e6677680f33660d53abfac1756 (patch) | |
tree | 22c9e48a8b24def8dbc06c035668a993434b7eeb /functions.js | |
parent | 59b7764387a7e47ad4526ebdcf71a3cf2da75a2d (diff) |
proper handling of failed sanity check in parse_counters + weird getAttribute workaround
Diffstat (limited to 'functions.js')
-rw-r--r-- | functions.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/functions.js b/functions.js index 01f1a1448..b17e8927e 100644 --- a/functions.js +++ b/functions.js @@ -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"); |