util: revert to old toFixed behavior.
This commit is contained in:
parent
1735fe6a6c
commit
60b345f59c
@ -855,6 +855,9 @@ util.toFixed = function toFixed(num, exp) {
|
||||
assert(lo.length <= exp, 'Invalid integer value.');
|
||||
|
||||
if (lo.length === 0)
|
||||
lo = '0';
|
||||
|
||||
if (exp === 0)
|
||||
return `${sign}${hi}`;
|
||||
|
||||
return `${sign}${hi}.${lo}`;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user