diff --git a/apps/client/src/app/components/home-watchlist/home-watchlist.component.ts b/apps/client/src/app/components/home-watchlist/home-watchlist.component.ts index 97fa6f744..7492e4e92 100644 --- a/apps/client/src/app/components/home-watchlist/home-watchlist.component.ts +++ b/apps/client/src/app/components/home-watchlist/home-watchlist.component.ts @@ -128,10 +128,17 @@ export class GfHomeWatchlistComponent implements OnInit { this.dataService .fetchWatchlist() .pipe(takeUntilDestroyed(this.destroyRef)) - .subscribe(({ watchlist }) => { - this.watchlist = watchlist; + .subscribe({ + error: () => { + this.watchlist = []; + + this.changeDetectorRef.markForCheck(); + }, + next: ({ watchlist }) => { + this.watchlist = watchlist ?? []; - this.changeDetectorRef.markForCheck(); + this.changeDetectorRef.markForCheck(); + } }); } diff --git a/apps/client/src/app/components/markets/markets.component.ts b/apps/client/src/app/components/markets/markets.component.ts index f4cc79287..0317ce648 100644 --- a/apps/client/src/app/components/markets/markets.component.ts +++ b/apps/client/src/app/components/markets/markets.component.ts @@ -122,7 +122,7 @@ export class GfMarketsComponent implements OnInit { this.benchmarks.set([]); }, next: ({ benchmarks }) => { - this.benchmarks.set(benchmarks); + this.benchmarks.set(benchmarks ?? []); } }); } diff --git a/apps/client/src/app/components/markets/markets.html b/apps/client/src/app/components/markets/markets.html index 2fb9c3246..d834dfd0e 100644 --- a/apps/client/src/app/components/markets/markets.html +++ b/apps/client/src/app/components/markets/markets.html @@ -56,7 +56,7 @@ [showSymbol]="false" [user]="user" /> - @if ((benchmarks()?.length ?? 0) > 0) { + @if (benchmarks()?.length) {