mirror of
https://github.com/jquery/jquery.git
synced 2026-01-25 18:38:07 -05:00
Fixed problem with $("div",$("body")) breaking (returning an array, of length one, containing undefined).
This commit is contained in:
2
src/jquery/jquery.js
vendored
2
src/jquery/jquery.js
vendored
@@ -1579,7 +1579,7 @@ jQuery.extend({
|
||||
|
||||
if ( val !== null && val != undefined ) {
|
||||
if ( val.constructor != Array ) val = [val];
|
||||
result = result.concat( val );
|
||||
result = result.concat( val );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ jQuery.extend({
|
||||
return [ t ];
|
||||
|
||||
// Make sure that the context is a DOM Element
|
||||
if ( context && context.nodeType == undefined )
|
||||
if ( context && !context.nodeType )
|
||||
context = null;
|
||||
|
||||
// Set the correct context (if none is provided)
|
||||
@@ -423,4 +423,4 @@ jQuery.extend({
|
||||
|
||||
return r;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user