diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2011-10-11 21:04:22 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2011-10-11 21:04:22 -0400 |
commit | 83c08ffa1ffa778e41d728ed7fa49044dd7135f9 (patch) | |
tree | 47c0d05e46556664e9e07277a727f395f6888bca /src/data.js | |
parent | 6afc2c074bec5c19063c8f8ebca6bfb53c7d4cef (diff) | |
download | jquery-83c08ffa1ffa778e41d728ed7fa49044dd7135f9.tar.gz jquery-83c08ffa1ffa778e41d728ed7fa49044dd7135f9.zip |
Fix #10478. Replace jQuery.isNaN with jQuery.isNumeric.
Thanks to Christian C. Salvadó for the unit tests!
Diffstat (limited to 'src/data.js')
-rw-r--r-- | src/data.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data.js b/src/data.js index 0ce3b7d66..02f96a849 100644 --- a/src/data.js +++ b/src/data.js @@ -323,7 +323,7 @@ function dataAttr( elem, key, data ) { data = data === "true" ? true : data === "false" ? false : data === "null" ? null : - !jQuery.isNaN( data ) ? parseFloat( data ) : + jQuery.isNumeric( data ) ? parseFloat( data ) : rbrace.test( data ) ? jQuery.parseJSON( data ) : data; } catch( e ) {} |