fix: Number format (#6028)

This commit is contained in:
Faris Ansari 2018-08-29 15:47:19 +05:30 committed by Nabin Hait
parent 394f451b6c
commit 6b508cf809

View file

@ -84,7 +84,8 @@ window.format_number = function (v, format, decimals) {
v = flt(v, decimals, format);
if (v < 0) var is_negative = true;
let is_negative = false;
if (v < 0) is_negative = true;
v = Math.abs(v);
v = v.toFixed(decimals);