diff --git a/lib/formatters.ts b/lib/formatters.ts index f88d9df..c14aa52 100644 --- a/lib/formatters.ts +++ b/lib/formatters.ts @@ -1,9 +1,9 @@ export const formatCurrency = ( number: number, currency: string, - locale: string | undefined = undefined + locale: string | null ): string => { - const CURRENCY_FORMATTER = new Intl.NumberFormat(locale, { + const CURRENCY_FORMATTER = new Intl.NumberFormat(locale || '', { currency: currency, style: 'currency' })