Avoid an additional javascript error in case of 404

This commit is contained in:
Nathan Gray 2013-02-06 10:47:31 +00:00
parent 7ebb83b772
commit de2c9756f1

View File

@ -62,8 +62,11 @@ function et2_loadXMLFromURL(_url, _callback, _context)
xmlhttp.onreadystatechange = function() { xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4) if (xmlhttp.readyState == 4)
{ {
var xmldoc = xmlhttp.responseXML.documentElement; if(xmlhttp.responseXML)
_callback.call(_context, xmldoc); {
var xmldoc = xmlhttp.responseXML.documentElement;
_callback.call(_context, xmldoc);
}
} }
} }