Fixes bugs in map loading on admin/stats screen
This commit is contained in:
@@ -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([
|
||||||
|
|||||||
Reference in New Issue
Block a user