From a04c573cd320790562388ce727b3840b51191218 Mon Sep 17 00:00:00 2001 From: kennethcheng Date: Tue, 28 Apr 2026 18:13:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E4=BF=AE=E5=A4=8D=20Big.js=20?= =?UTF-8?q?=E8=AF=AF=E7=94=A8=20.ne()=20=E6=96=B9=E6=B3=95=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=20TypeError=EF=BC=8C=E6=94=B9=E7=94=A8=20!.e?= =?UTF-8?q?q()=20=E5=AE=9E=E7=8E=B0=E5=88=A4=E9=9B=B6=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/dashboard/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index 965bd60..65f9edc 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -71,8 +71,8 @@ export default async function DashboardPage() { const posPnlNative = new Big(pos.pnlNative); const posPnlNativePositive = posPnlNative.gte(0); - const avgCostFormatted = new Big(pos.avgCost).ne(0) && pos.avgCost !== '0' ? formatAmount(pos.avgCost) : '-'; - const dilutedCostFormatted = new Big(pos.dilutedCost).ne(0) && pos.dilutedCost !== '0' ? formatAmount(pos.dilutedCost) : '-'; + const avgCostFormatted = !new Big(pos.avgCost).eq(0) && pos.avgCost !== '0' ? formatAmount(pos.avgCost) : '-'; + const dilutedCostFormatted = !new Big(pos.dilutedCost).eq(0) && pos.dilutedCost !== '0' ? formatAmount(pos.dilutedCost) : '-'; return (