From ff29f03fdbf24de807bf028e16e35bf5b63f6f66 Mon Sep 17 00:00:00 2001 From: J7 Date: Sat, 12 Oct 2024 16:28:42 +0800 Subject: [PATCH] fix: getCurrencyString Exception --- js/src/utils/functions/common.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/utils/functions/common.tsx b/js/src/utils/functions/common.tsx index 4786646..55d2040 100644 --- a/js/src/utils/functions/common.tsx +++ b/js/src/utils/functions/common.tsx @@ -44,7 +44,7 @@ export const getCurrencyString = ({ price: number | string | undefined symbol?: string }) => { - if (typeof price === 'undefined' || price === null) return '' + if (!price && price !== 0 && price !== '0') return '' if (typeof price === 'string') return `${symbol} ${price}` return `${symbol} ${price.toString()}` }