Skip to content

Commit

Permalink
Fix test failure wrt Math.sign
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 3, 2014
1 parent 1c3f8e9 commit cc7f9d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
var number = +value;
if (Number.isNaN(number)) return 0;
if (number === 0 || !Number.isFinite(number)) return number;
return Math.sign(number) * Math.floor(Math.abs(number));
return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
},

ToLength: function(value) {
Expand Down

0 comments on commit cc7f9d6

Please sign in to comment.