diff options
author | Liza Ramo <liza.h.ramo@gmail.com> | 2015-10-17 16:48:57 -0400 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-10-17 16:50:05 -0400 |
commit | 0703fd52ef88a2cdac93502070c51c93ffa1dfdd (patch) | |
tree | 0a13b247574110bf7961ef438bdb761aed527e7c /src/core.js | |
parent | 44f8239d3f9d09d81e2885e9ae7e044277b67341 (diff) | |
download | jquery-0703fd52ef88a2cdac93502070c51c93ffa1dfdd.tar.gz jquery-0703fd52ef88a2cdac93502070c51c93ffa1dfdd.zip |
Core: make isNumeric test work on Symbol
Ref #2645
Closes #2657
Diffstat (limited to 'src/core.js')
-rw-r--r-- | src/core.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core.js b/src/core.js index b1483c018..a31e5f93f 100644 --- a/src/core.js +++ b/src/core.js @@ -214,7 +214,8 @@ jQuery.extend( { // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN // adding 1 corrects loss of precision from parseFloat (#15100) - return !jQuery.isArray( obj ) && ( obj - parseFloat( obj ) + 1 ) >= 0; + var realStringObj = obj && obj.toString(); + return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0; }, isPlainObject: function( obj ) { |