Browse Source

fix(client): resolve type errors

pull/7302/head
KenTandrian 4 days ago
parent
commit
47282dcd12
  1. 6
      apps/client/src/app/components/home-holdings/home-holdings.component.ts
  2. 2
      apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts

6
apps/client/src/app/components/home-holdings/home-holdings.component.ts

@ -119,6 +119,10 @@ export class GfHomeHoldingsComponent implements OnInit {
this.viewModeFormControl.valueChanges
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((holdingsViewMode) => {
if (!holdingsViewMode) {
return;
}
this.dataService
.putUserSetting({ holdingsViewMode })
.pipe(takeUntilDestroyed(this.destroyRef))
@ -185,7 +189,7 @@ export class GfHomeHoldingsComponent implements OnInit {
);
}
this.holdings = undefined;
this.holdings = [];
this.fetchHoldings()
.pipe(takeUntilDestroyed(this.destroyRef))

2
apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts

@ -114,7 +114,7 @@ export class GfUserDetailDialogComponent implements OnInit {
return price !== null;
})
.map(({ price }) => {
return new Big(price);
return new Big(price ?? 0);
})
).toNumber();
}

Loading…
Cancel
Save