mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Fixed 0 amount in new price helper
refs 67bf3a77c1
Fixes price helper update not considering 0 amount in final formatting.
This commit is contained in:
parent
3eb8b91a6b
commit
054d997ece
@ -23,7 +23,7 @@ function formatter({amount, currency, numberFormat = 'short', currencyFormat = '
|
||||
if (numberFormat === 'short') {
|
||||
formatterOptions.minimumFractionDigits = 0;
|
||||
}
|
||||
if (amount) {
|
||||
if (_.isNumber(amount)) {
|
||||
return new Intl.NumberFormat(locale, formatterOptions).format(amount);
|
||||
} else {
|
||||
const val = new Intl.NumberFormat('en', {
|
||||
|
Loading…
Reference in New Issue
Block a user