mirror of
https://github.com/jquery/jquery.git
synced 2026-01-25 12:17:55 -05:00
Fixed a bug where nothing was passed in to $(), it would bomb out.
This commit is contained in:
7
jquery/jquery.js
vendored
7
jquery/jquery.js
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user