Add toNumber use to _.toInteger.

This commit is contained in:
John-David Dalton
2015-11-01 14:51:25 -08:00
parent 04c7b33f90
commit 94fb8c6f92
2 changed files with 61 additions and 25 deletions

View File

@@ -9850,7 +9850,7 @@
* // => 1.7976931348623157e+308
*/
function toInteger(value) {
value = +value;
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;