util: revert to old toFixed behavior.

This commit is contained in:
Christopher Jeffrey 2017-08-11 04:52:51 -07:00
parent 1735fe6a6c
commit 60b345f59c
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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}`;