From 4fef22a36d89f39d328a94578c89ec0e7165434c Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Tue, 18 Apr 2023 20:09:54 +0200 Subject: [PATCH] Clone countries before manipulation --- .../components/world-map-chart/world-map-chart.component.ts | 3 +++ 1 file changed, 3 insertions(+) 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 9d7c61d62..62774edf2 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;