From ea7025d911ddc495b289a02c11e0c0afe880675f Mon Sep 17 00:00:00 2001 From: kfj001 Date: Sun, 28 Jun 2026 11:32:42 +0000 Subject: [PATCH] Fixes bugs in map loading on admin/stats screen --- src/app/admin/admin-stats-dashboard.component.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/admin/admin-stats-dashboard.component.ts b/src/app/admin/admin-stats-dashboard.component.ts index e2f9633..128b045 100644 --- a/src/app/admin/admin-stats-dashboard.component.ts +++ b/src/app/admin/admin-stats-dashboard.component.ts @@ -189,6 +189,14 @@ export class AdminStatsDashboardComponent implements OnInit, AfterViewChecked, O async loadAll(): Promise { this.loading = true; this.error = null; + + // Destroy existing map so it re-initializes on the new DOM element + // created when loading flips back to false. + if (this.map) { + this.map.remove(); + this.map = null; + } + this.mapInitialized = false; const { start, end } = this.getDates(); try { const [summary, timeSeries, geoStats] = await Promise.all([