mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 06:21:44 +01:00
Merge pull request #711 from rockstardev/bugfix/satround
Javascript floating point math fix, closes #701
This commit is contained in:
commit
563882d30b
1 changed files with 2 additions and 1 deletions
|
@ -106,7 +106,8 @@ function onDataCallback(jsonData) {
|
|||
}
|
||||
|
||||
function numberFormatted(x) {
|
||||
var parts = x.toString().split(".");
|
||||
var rounded = Math.round(x);
|
||||
var parts = rounded.toString().split(".");
|
||||
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
||||
return parts.join(".");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue