From 2c10cd7edfc7be909d78dfa3ab83d9c3bbad04a9 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 26 Jan 2024 08:35:23 +0100 Subject: [PATCH] Bugfix/remove holdings with incomplete data from top3 bottom3 performers (#2921) * Remove holdings with incomplete data * Update changelog --- CHANGELOG.md | 4 ++++ .../app/pages/portfolio/analysis/analysis-page.component.ts | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16fa6c93..6752784f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the language localization for German (`de`) +### Fixed + +- Removed holdings with incomplete data from the _Top 3_ and _Bottom 3_ performers on the analysis page + ## 2.44.0 - 2024-01-24 ### Fixed diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts index 7fd5b342..f0fb3366 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -379,7 +379,9 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { .pipe(takeUntil(this.unsubscribeSubject)) .subscribe(({ positions }) => { const positionsSorted = sortBy( - positions, + positions.filter(({ netPerformancePercentage }) => { + return isNumber(netPerformancePercentage); + }), 'netPerformancePercentage' ).reverse();