git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
735d44f
)
Made sure that a child element exists before the check is done, fixes jQuery bug...
author
John Resig
<jeresig@gmail.com>
Mon, 19 Jan 2009 23:04:03 +0000
(23:04 +0000)
committer
John Resig
<jeresig@gmail.com>
Mon, 19 Jan 2009 23:04:03 +0000
(23:04 +0000)
src/selector.js
patch
|
blob
|
history
diff --git
a/src/selector.js
b/src/selector.js
index
3371119
..
59ca2f6
100644
(file)
--- 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 = "<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);
};