mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-19 15:04:19 +01:00
Javascript floating point math fix, closes #701
This commit is contained in:
@@ -106,7 +106,8 @@ function onDataCallback(jsonData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function numberFormatted(x) {
|
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, " ");
|
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
||||||
return parts.join(".");
|
return parts.join(".");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user