Commit 67999828 authored by John Resig's avatar John Resig

Made sure that a child element exists before the check is done, fixes jQuery bug #3870.

parent 735d44f6
......@@ -700,7 +700,7 @@ try {
// Check to see if an attribute returns normalized href attributes
div.innerHTML = "<a href='#'></a>";
if ( div.firstChild.getAttribute("href") !== "#" ) {
if ( div.firstChild && div.firstChild.getAttribute("href") !== "#" ) {
Expr.attrHandle.href = function(elem){
return elem.getAttribute("href", 2);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment