Merge pull request #3311

45b5150 Utils: fix removeTrailingZeros regression (xiphon)
This commit is contained in:
luigi1111 2021-01-20 22:43:27 -05:00
commit 2a44f95f16
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -113,5 +113,5 @@ function capitalize(s){
}
function removeTrailingZeros(value) {
return (value + '').replace(/\.?0*$/, '');
return (value + '').replace(/(\.\d*?)0+$/, '$1').replace(/\.$/, '');
}