From 3ac628f4b97961233c99ab9ab7275e3050726f79 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Wed, 29 Dec 2021 16:02:24 +0530 Subject: [PATCH] fix: bug, forgot to call .format --- utils/numberFormat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/numberFormat.js b/utils/numberFormat.js index dc023c65..7fc8dad5 100644 --- a/utils/numberFormat.js +++ b/utils/numberFormat.js @@ -134,10 +134,10 @@ module.exports = { return currencyFormatter.format(value.round()); } - const formattedCurrency = currencyFormatter(value); + const formattedCurrency = currencyFormatter.format(value); if (formattedCurrency === 'NaN') { throw Error( - `invalide value passed to formatCurrency: '${value}' of type ${typeof value}` + `invalid value passed to formatCurrency: '${value}' of type ${typeof value}` ); }