mirror of
https://github.com/jquery/jquery.git
synced 2026-02-10 08:45:32 -05:00
Core: Standardize indexOf comparisons
not present: `< 0` present: `> -1` at index: `=== N` Closes gh-1984
This commit is contained in:
@@ -33,7 +33,7 @@ function winnow( elements, qualifier, not ) {
|
||||
}
|
||||
|
||||
return jQuery.grep( elements, function( elem ) {
|
||||
return ( indexOf.call( qualifier, elem ) >= 0 ) !== not;
|
||||
return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user