mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Use nativeIsFinite() instead of Number.isFinite().
This commit is contained in:
@@ -5416,7 +5416,7 @@
|
|||||||
return function(number, precision) {
|
return function(number, precision) {
|
||||||
number = toNumber(number);
|
number = toNumber(number);
|
||||||
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
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.
|
// Shift with exponential notation to avoid floating-point issues.
|
||||||
// See [MDN](https://mdn.io/round#Examples) for more details.
|
// See [MDN](https://mdn.io/round#Examples) for more details.
|
||||||
var pair = (toString(number) + 'e').split('e'),
|
var pair = (toString(number) + 'e').split('e'),
|
||||||
|
|||||||
Reference in New Issue
Block a user