aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-11 23:23:32 -0800
committerAdam Soltys <[email protected]>2026-02-11 23:23:32 -0800
commit13f9ef7f26fff64c2bd54c8f9aa14e6ffac67121 (patch)
tree076cd631b671ff5ab74dee08c775c20c192ac659 /src/lib/utils.ts
parent2e61e8abbc318c36969cb5add0c63df81135b4ab (diff)
downloadcoinos-ui-13f9ef7f26fff64c2bd54c8f9aa14e6ffac67121.tar.gz
coinos-ui-13f9ef7f26fff64c2bd54c8f9aa14e6ffac67121.zip
fix svelte errors
Diffstat (limited to 'src/lib/utils.ts')
-rw-r--r--src/lib/utils.ts4
1 files changed, 2 insertions, 2 deletions
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);
};