From 3fab10fee2c099a4bfc6ae103f50bbec84e4296f Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 25 Jun 2025 11:23:41 +0200 Subject: [PATCH] Fix: Update footer row visibility logic and handle performance data safely --- .../lib/holdings-table/holdings-table.component.html | 2 +- .../src/lib/holdings-table/holdings-table.component.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.html b/libs/ui/src/lib/holdings-table/holdings-table.component.html index 728f79761..74061c143 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.html +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.html @@ -252,7 +252,7 @@ diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.ts b/libs/ui/src/lib/holdings-table/holdings-table.component.ts index 91d4e5e7d..58023a2c6 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.ts +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.ts @@ -96,10 +96,12 @@ export class GfHoldingsTableComponent implements OnChanges, OnDestroy { this.dataSource = new MatTableDataSource(this.holdings); this.dataSource.paginator = this.paginator; this.dataSource.sort = this.sort; - this.totalValue = this.performance.currentValueInBaseCurrency; - this.totalChange = this.performance.netPerformanceWithCurrencyEffect; - this.totalChangePercentage = - this.performance.netPerformancePercentageWithCurrencyEffect; + if (this.performance) { + this.totalValue = this.performance?.currentValueInBaseCurrency; + this.totalChange = this.performance?.netPerformanceWithCurrencyEffect; + this.totalChangePercentage = + this.performance?.netPerformancePercentageWithCurrencyEffect; + } if (this.holdings) { this.isLoading = false;