From a9ec1d29e5660d6fc396006d7fca571a08a41b01 Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:48:05 -0700 Subject: [PATCH] fix wrongful console.warn on i18n money formatter --- src/plugins/i18n.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts index bcc1b7a7870..496031cdefb 100644 --- a/src/plugins/i18n.ts +++ b/src/plugins/i18n.ts @@ -109,7 +109,7 @@ async function initFonts(language: string | undefined) { * @returns a money formatted string */ function i18nMoneyFormatter(amount: any): string { - if (typeof amount !== "number") { + if (isNaN(Number(amount))) { console.warn(`i18nMoneyFormatter: value "${amount}" is not a number!`); }