X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fselector.js;h=59ca2f6d5c5c542ad304461faecfb425cf905064;hb=04977b8ea2f9cbf786ae244a8b47aed67e37df7f;hp=337111912e6837cd26a841ae129ba5c72fa3044a;hpb=82e8d11c12f160fbf07a8faef5931c2f7a364a6a;p=jquery.git diff --git a/src/selector.js b/src/selector.js index 3371119..59ca2f6 100644 --- a/src/selector.js +++ b/src/selector.js @@ -700,7 +700,7 @@ try { // Check to see if an attribute returns normalized href attributes div.innerHTML = ""; - if ( div.firstChild.getAttribute("href") !== "#" ) { + if ( div.firstChild && div.firstChild.getAttribute("href") !== "#" ) { Expr.attrHandle.href = function(elem){ return elem.getAttribute("href", 2); };