Browse Source

fix(client): resolve type errors

pull/7302/head
KenTandrian 3 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 this.viewModeFormControl.valueChanges
.pipe(takeUntilDestroyed(this.destroyRef)) .pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((holdingsViewMode) => { .subscribe((holdingsViewMode) => {
if (!holdingsViewMode) {
return;
}
this.dataService this.dataService
.putUserSetting({ holdingsViewMode }) .putUserSetting({ holdingsViewMode })
.pipe(takeUntilDestroyed(this.destroyRef)) .pipe(takeUntilDestroyed(this.destroyRef))
@ -185,7 +189,7 @@ export class GfHomeHoldingsComponent implements OnInit {
); );
} }
this.holdings = undefined; this.holdings = [];
this.fetchHoldings() this.fetchHoldings()
.pipe(takeUntilDestroyed(this.destroyRef)) .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; return price !== null;
}) })
.map(({ price }) => { .map(({ price }) => {
return new Big(price); return new Big(price ?? 0);
}) })
).toNumber(); ).toNumber();
} }

Loading…
Cancel
Save