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

@@ -160,7 +160,7 @@ jQuery.fn.extend({
// *... In the case of properties that might _actually_
// have dashes, we need to also store a copy of that
// unchanged property.
if ( key.indexOf("-") !== -1 && data !== undefined ) {
if ( key.indexOf("-") > -1 && data !== undefined ) {
dataUser.set( this, key, value );
}
});