From ce17f8dfe083621887fa917f069005e149acbef2 Mon Sep 17 00:00:00 2001 From: 3st3ban3 Date: Wed, 15 Feb 2023 18:46:20 +0100 Subject: [PATCH] Fix undefined error without refreshing page after creating advanced filters --- umap/static/umap/js/umap.controls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index 22294661..2ca538b9 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -785,7 +785,7 @@ L.U.Map.include({ } advancedFilterKeys.forEach(property => { advancedFiltersFull[property] = []; - if (!filtersAlreadyLoaded) { + if (!filtersAlreadyLoaded || !this.getMap().options.advancedFilters[property]) { this.getMap().options.advancedFilters[property] = []; } });