mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 22:14:58 -05:00
Update jshintrc to conform to new style guide. Conform to onevar and unused in tests. Fixes #13755.
This commit is contained in:
12
src/data.js
12
src/data.js
@@ -333,12 +333,12 @@ function dataAttr( elem, key, data ) {
|
||||
if ( typeof data === "string" ) {
|
||||
try {
|
||||
data = data === "true" ? true :
|
||||
data === "false" ? false :
|
||||
data === "null" ? null :
|
||||
// Only convert to a number if it doesn't change the string
|
||||
+data + "" === data ? +data :
|
||||
rbrace.test( data ) ?
|
||||
JSON.parse( data ) : data;
|
||||
data === "false" ? false :
|
||||
data === "null" ? null :
|
||||
// Only convert to a number if it doesn't change the string
|
||||
+data + "" === data ? +data :
|
||||
rbrace.test( data ) ? JSON.parse( data ) :
|
||||
data;
|
||||
} catch( e ) {}
|
||||
|
||||
// Make sure we set the data so it isn't changed later
|
||||
|
||||
Reference in New Issue
Block a user