From 45b515048734c37fea70d2ff940a3a94ba985f0a Mon Sep 17 00:00:00 2001 From: xiphon Date: Sat, 16 Jan 2021 03:31:23 +0000 Subject: [PATCH] Utils: fix removeTrailingZeros regression --- js/Utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/Utils.js b/js/Utils.js index 2ad603ef..61f4509b 100644 --- a/js/Utils.js +++ b/js/Utils.js @@ -113,5 +113,5 @@ function capitalize(s){ } function removeTrailingZeros(value) { - return (value + '').replace(/\.?0*$/, ''); + return (value + '').replace(/(\.\d*?)0+$/, '$1').replace(/\.$/, ''); }