Made sure that a child element exists before the check is done, fixes jQuery bug #3870.
This commit is contained in:
parent
735d44f6df
commit
6799982835
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue