From f825e5628791d08a63dd60c5dc22a06e88825614 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Sat, 15 Apr 2023 22:15:25 +0200 Subject: [PATCH] fixed some type errors --- lib/formatters.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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' })