2
0
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:
18alantom 2021-12-29 16:02:24 +05:30
parent 84724ff731
commit 3ac628f4b9

View File

@ -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}`
); );
} }