Fixes bugs in map loading on admin/stats screen

This commit is contained in:
2026-06-28 11:32:42 +00:00
parent f3ba0bf5ba
commit ea7025d911
@@ -189,6 +189,14 @@ export class AdminStatsDashboardComponent implements OnInit, AfterViewChecked, O
async loadAll(): Promise<void> { async loadAll(): Promise<void> {
this.loading = true; this.loading = true;
this.error = null; 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(); const { start, end } = this.getDates();
try { try {
const [summary, timeSeries, geoStats] = await Promise.all([ const [summary, timeSeries, geoStats] = await Promise.all([