Core: Standardize indexOf comparisons

not present: `< 0`
present: `> -1`
at index: `=== N`

Closes gh-1984
This commit is contained in:
Richard Gibson
2014-12-31 18:31:27 -05:00
parent 4cbf02df84
commit 53aa87f3bf
8 changed files with 12 additions and 11 deletions

View File

@@ -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;
});
}