mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
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
@ -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 New Issue
Block a user