Use nativeIsFinite() instead of Number.isFinite().

This commit is contained in:
John-David Dalton
2019-07-09 09:33:04 -07:00
parent f8dc2149f7
commit 52ab48c054

View File

@@ -5416,7 +5416,7 @@
return function(number, precision) {
number = toNumber(number);
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
if (precision && Number.isFinite(number)) {
if (precision && nativeIsFinite(number)) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
var pair = (toString(number) + 'e').split('e'),