From 67382cfbe73a4809a2d174f2f4cad3279d4a3f4d Mon Sep 17 00:00:00 2001 From: Hakadao Date: Fri, 30 Aug 2024 00:44:26 +0800 Subject: [PATCH] fix: adjust numFormatter function --- src/utils/dataFormatter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/dataFormatter.ts b/src/utils/dataFormatter.ts index 9373e94f..b17d2d89 100644 --- a/src/utils/dataFormatter.ts +++ b/src/utils/dataFormatter.ts @@ -38,7 +38,9 @@ export function numFormatter(num: number | string): string { if (num.includes('萬') || num.includes('万')) { num = (Number(num.replaceAll('萬', '').replaceAll('万', '')) || 0) * 10000 } - num = Number(num) + else { + num = Number(num) + } } const item = lookup.slice().reverse().find((item) => { return num >= item.value