From 3ce598e262444f45d35da6cab8bbd49ee00c7ad1 Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Thu, 9 Jul 2026 23:22:44 +0700 Subject: [PATCH] fix(client): resolve type errors --- .../user-detail-dialog.component.ts | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts b/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts index 73e09f612..7f0f12d7e 100644 --- a/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts +++ b/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts @@ -106,15 +106,17 @@ export class GfUserDetailDialogComponent implements OnInit { } public getSum() { - return getSum( - this.subscriptionsDataSource.data - .filter(({ price }) => { - return price !== null; - }) - .map(({ price }) => { - return new Big(price); - }) - ).toNumber(); + const prices = this.subscriptionsDataSource.data.reduce( + (acc, { price }) => { + if (price !== null) { + acc.push(new Big(price)); + } + + return acc; + }, + [] + ); + return getSum(prices).toNumber(); } public getType({ createdAt, expiresAt, price }: Subscription) {