From 13f9ef7f26fff64c2bd54c8f9aa14e6ffac67121 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 11 Feb 2026 23:23:32 -0800 Subject: fix svelte errors --- src/lib/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/utils.ts') diff --git a/src/lib/utils.ts b/src/lib/utils.ts index c1514d6b..a96db03d 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -331,7 +331,7 @@ export const f = ( minimumFractionDigits = 2, maximumFractionDigits = 2, ) => { - const l = typeof locale === "function" ? locale() : locale || "en-US"; + const l = typeof locale === "function" ? (locale as () => string)() : locale || "en-US"; const cur = currency || "USD"; const region = l.length >= 2 ? l.slice(-2) : ""; const currencyDisplay = region && cur.startsWith(region) ? "narrowSymbol" : "symbol"; @@ -345,7 +345,7 @@ export const f = ( }; export const s = (s: number, locale = "en-US"): string => { - const l = typeof locale === "function" ? locale() : locale || "en-US"; + const l = typeof locale === "function" ? (locale as () => string)() : locale || "en-US"; return new Intl.NumberFormat(l, { maximumFractionDigits: 0 }).format(s); }; -- cgit v1.2.3