Skip to content
Permalink
Browse files
Fixed a bug where nothing was passed in to $(), it would bomb out.
  • Loading branch information
jeresig committed Jul 6, 2006
1 parent 2140077 commit 414d059941343fa3c6bbbf40d3cb55cba4c4c85e
Showing with 4 additions and 3 deletions.
  1. +4 −3 jquery/jquery.js
@@ -17,6 +17,10 @@ window.undefined = window.undefined;
* @constructor
*/
function jQuery(a,c) {

// Make sure t hat a selection was provided
a = a || jQuery.context || document;

/*
* Handle support for overriding other $() functions. Way too many libraries
* provide this function to simply ignore it and overwrite it.
@@ -35,9 +39,6 @@ function jQuery(a,c) {
// Use the default method, in case it works some voodoo
return jQuery._$( a );

// Make sure t hat a selection was provided
a = a || jQuery.context || document;

// Watch for when a jQuery object is passed as the selector
if ( a.jquery )
return a;

0 comments on commit 414d059

Please sign in to comment.