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:
Rish 2021-02-25 20:08:37 +05:30
parent 3eb8b91a6b
commit 054d997ece

View File

@ -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', {