mirror of
https://github.com/frappe/books.git
synced 2025-02-09 15:38:39 +00:00
fix: bug, forgot to call .format
This commit is contained in:
parent
84724ff731
commit
3ac628f4b9
@ -134,10 +134,10 @@ module.exports = {
|
|||||||
return currencyFormatter.format(value.round());
|
return currencyFormatter.format(value.round());
|
||||||
}
|
}
|
||||||
|
|
||||||
const formattedCurrency = currencyFormatter(value);
|
const formattedCurrency = currencyFormatter.format(value);
|
||||||
if (formattedCurrency === 'NaN') {
|
if (formattedCurrency === 'NaN') {
|
||||||
throw Error(
|
throw Error(
|
||||||
`invalide value passed to formatCurrency: '${value}' of type ${typeof value}`
|
`invalid value passed to formatCurrency: '${value}' of type ${typeof value}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user