Core: make isNumeric limited to strings and numbers

Fixes gh-2662
This commit is contained in:
Timmy Willison
2015-10-18 15:50:43 -04:00
parent 1144e754a6
commit 15ac848868
2 changed files with 7 additions and 7 deletions

View File

@@ -474,8 +474,8 @@ QUnit.test( "isNumeric", function( assert ) {
assert.ok( t( 1.5999999999999999 ), "Very precise floating point number" );
assert.ok( t( 8e5 ), "Exponential notation" );
assert.ok( t( "123e-2" ), "Exponential notation string" );
assert.ok( t( new ToString( "42" ) ), "Custom .toString returning number" );
assert.equal( t( new ToString( "42" ) ), false, "Custom .toString returning number" );
assert.equal( t( "" ), false, "Empty string" );
assert.equal( t( " " ), false, "Whitespace characters string" );
assert.equal( t( "\t\t" ), false, "Tab characters string" );