Fixed #2062 by adding a check to see if the selector is array-like in .not() before testing it as an array. Otherwise it does a straight comparison during the filter test.
This commit is contained in:
parent
d7f5a0835b
commit
90b25efa6c
2 changed files with 7 additions and 2 deletions
|
@ -353,7 +353,10 @@ jQuery.fn = jQuery.prototype = {
|
|||
selector = jQuery.multiFilter( selector, this );
|
||||
|
||||
return this.filter(function() {
|
||||
return jQuery.inArray( this, selector ) < 0;
|
||||
// check to see if the selector is array-like otherwise assume it is just a DOM element
|
||||
return ( selector.length && selector[selector.length - 1] !== undefined )
|
||||
? jQuery.inArray( this, selector ) < 0
|
||||
: this != selector;
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue