Browse Source

handle the case either datasource or symbol is empty

pull/4031/head
Amandee Ellawala 10 months ago
committed by Thomas Kaul
parent
commit
1cf6338376
  1. 3
      libs/ui/src/lib/assistant/assistant.component.ts

3
libs/ui/src/lib/assistant/assistant.component.ts

@ -512,7 +512,8 @@ export class GfAssistantComponent implements OnChanges, OnDestroy, OnInit {
const dataSource = this.user?.settings?.['filters.dataSource']?.[0] ?? null;
const symbol = this.user?.settings?.['filters.symbol']?.[0] ?? null;
const selectedHolding = this.allPortfolioHoldings.filter(
(h) => h.dataSource === dataSource && h.symbol === symbol
(h) =>
(h.dataSource ?? null) === dataSource && (h.symbol ?? null) === symbol
);
const holding = selectedHolding[0] ?? null;

Loading…
Cancel
Save