aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2020-12-10 22:58:35 +0000
committerxiphon <xiphon@protonmail.com>2020-12-10 23:00:39 +0000
commit841d0e01dc94afea5b16ef010a0eded95304df16 (patch)
tree2cbe90b304442ecc01cae3905a7758b63701a143 /js
parentea1fee2f5f842a293458a66638c15ff79e1d101d (diff)
downloadmonzero-gui-841d0e01dc94afea5b16ef010a0eded95304df16.tar.gz
monzero-gui-841d0e01dc94afea5b16ef010a0eded95304df16.tar.xz
monzero-gui-841d0e01dc94afea5b16ef010a0eded95304df16.zip
Utils: removeTrailingZeros - handle .0* decimal part (i.e. 1.00000)
Diffstat (limited to 'js')
-rw-r--r--js/Utils.js2
1 files changed, 1 insertions, 1 deletions
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*$/, '');
}