mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 14:54:57 -05:00
Core: Standardize indexOf comparisons
not present: `< 0` present: `> -1` at index: `=== N` Closes gh-1984
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user