From 841d0e01dc94afea5b16ef010a0eded95304df16 Mon Sep 17 00:00:00 2001 From: xiphon Date: Thu, 10 Dec 2020 22:58:35 +0000 Subject: [PATCH] Utils: removeTrailingZeros - handle .0* decimal part (i.e. 1.00000) --- js/Utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/Utils.js b/js/Utils.js index 17ba38b1..2ad603ef 100644 --- a/js/Utils.js +++ b/js/Utils.js @@ -113,5 +113,5 @@ function capitalize(s){ } function removeTrailingZeros(value) { - return (value + '').replace(/(\.\d*[1-9])0+$/, '$1'); + return (value + '').replace(/\.?0*$/, ''); }