Skip to content
Permalink
Browse files

Make sure that the body element exists before doing the body selector…

… optimization. Fixes #6529.
  • Loading branch information
jeresig committed Sep 24, 2010
1 parent 5c05504 commit e0a9615f82fcdad73de6db42a995eb2a5550e361
Showing with 1 addition and 1 deletion.
  1. +1 −1 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";

0 comments on commit e0a9615

Please sign in to comment.
You can’t perform that action at this time.