Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Refactor] from 5669f01 and 41b5bfb
  • Loading branch information
ljharb committed Jan 6, 2016
1 parent 12eb504 commit aa65184
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions es5-shim.js
Expand Up @@ -1949,13 +1949,10 @@ if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) {
if (1 / parseFloat(-0) !== -Infinity) {
/* global parseFloat: true */
parseFloat = (function (origParseFloat) {
var negativeZeroRegex = /^\s*\-0+\D*$/;
return function parseFloat(string) {
var inputString = $String(string);
if (negativeZeroRegex.test(inputString)) {
return -0;
}
return origParseFloat(inputString);
var inputString = trim(string);
var result = origParseFloat(inputString);
return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result;
};
}(parseFloat));
}
Expand Down

0 comments on commit aa65184

Please sign in to comment.