Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Made sure that a child element exists before the check is done, fixes…

… jQuery bug #3870.
  • Loading branch information...
commit 679998283570ce9fbbe310a9f37169c20e871ef4 1 parent 735d44f
John Resig jeresig authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  src/selector.js
2  src/selector.js
@@ -700,7 +700,7 @@ try {
700 700
701 701 // Check to see if an attribute returns normalized href attributes
702 702 div.innerHTML = "<a href='#'></a>";
703   - if ( div.firstChild.getAttribute("href") !== "#" ) {
  703 + if ( div.firstChild && div.firstChild.getAttribute("href") !== "#" ) {
704 704 Expr.attrHandle.href = function(elem){
705 705 return elem.getAttribute("href", 2);
706 706 };

0 comments on commit 6799982

Please sign in to comment.
Something went wrong with that request. Please try again.