mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Javascript floating point math fix, closes #701
This commit is contained in:
@@ -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(".");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user