From 80a3668aa955bccb7c33a55a9bd17ce2c475eb2e Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 18 Apr 2023 20:32:18 +0200 Subject: [PATCH] Bugfix/fix world map chart component (#1871) * Clone countries before manipulation * Update changelog --- CHANGELOG.md | 1 + .../components/world-map-chart/world-map-chart.component.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e02ae487..d3194d6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed an issue in the global heat map component caused by manipulating an input property - Fixed an issue with the currency inconsistency in the _EOD Historical Data_ service (convert from `GBX` to `GBp`) ## 1.256.0 - 2023-04-17 diff --git a/apps/client/src/app/components/world-map-chart/world-map-chart.component.ts b/apps/client/src/app/components/world-map-chart/world-map-chart.component.ts index 9d7c61d6..62774edf 100644 --- a/apps/client/src/app/components/world-map-chart/world-map-chart.component.ts +++ b/apps/client/src/app/components/world-map-chart/world-map-chart.component.ts @@ -30,6 +30,9 @@ export class WorldMapChartComponent implements OnChanges, OnDestroy, OnInit { public ngOnInit() {} public ngOnChanges() { + // Create a copy before manipulating countries object + this.countries = structuredClone(this.countries); + if (this.countries) { this.isLoading = true;