mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Use nativeIsFinite() instead of Number.isFinite().
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user