fix wrongful console.warn on i18n money formatter

This commit is contained in:
flx-sta 2024-10-02 12:48:05 -07:00
parent 18ef10c644
commit a9ec1d29e5

View File

@ -109,7 +109,7 @@ async function initFonts(language: string | undefined) {
* @returns a money formatted string * @returns a money formatted string
*/ */
function i18nMoneyFormatter(amount: any): string { function i18nMoneyFormatter(amount: any): string {
if (typeof amount !== "number") { if (isNaN(Number(amount))) {
console.warn(`i18nMoneyFormatter: value "${amount}" is not a number!`); console.warn(`i18nMoneyFormatter: value "${amount}" is not a number!`);
} }