No need to do the closest match if no selectors are passed in.
This commit is contained in:
parent
e534a310c7
commit
4daae7a79f
2 changed files with 34 additions and 17 deletions
|
@ -58,7 +58,7 @@ jQuery.fn.extend({
|
|||
if ( jQuery.isArray( selectors ) ) {
|
||||
var ret = [], cur = this[0], selector;
|
||||
|
||||
if ( cur ) {
|
||||
if ( cur && selectors.length ) {
|
||||
for ( var i = 0, l = selectors.length; i < l; i++ ) {
|
||||
selectors[i] = jQuery.expr.match.POS.test( selector ) ?
|
||||
jQuery( selector, context || this.context ) :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue