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:
5c05504
)
Make sure that the body element exists before doing the body selector optimization...
author
jeresig
<jeresig@gmail.com>
Fri, 24 Sep 2010 19:53:38 +0000
(15:53 -0400)
committer
jeresig
<jeresig@gmail.com>
Fri, 24 Sep 2010 19:53:38 +0000
(15:53 -0400)
src/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
6c6d006
..
cc92138
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-91,7
+91,7
@@
jQuery.fn = jQuery.prototype = {
}
// The body element only exists once, optimize finding it
- if ( selector === "body" && !context ) {
+ if ( selector === "body" && !context && document.body ) {
this.context = document;
this[0] = document.body;
this.selector = "body";