aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.js')
-rw-r--r--src/data.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/data.js b/src/data.js
index acb3fa265..0fd35033a 100644
--- a/src/data.js
+++ b/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