mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-01 15:29:19 +03:00
Fixed incorrect price amount formatting
no refs - price amount formatting was incorrectly calling `toFixed` method on a string, which is not needed as we already round off the amount before formatting
This commit is contained in:
parent
4994e27838
commit
209d3662d4
@ -7,7 +7,7 @@ export function ghPriceAmount(amount) {
|
|||||||
if (price % 1 === 0) {
|
if (price % 1 === 0) {
|
||||||
return formatNumber(price);
|
return formatNumber(price);
|
||||||
} else {
|
} else {
|
||||||
return formatNumber(Math.round(price * 100) / 100).toFixed(2);
|
return formatNumber(Math.round(price * 100) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user