diff --git a/loko/assets/static/assets/unified_index.js b/loko/assets/static/assets/unified_index.js index 21cf7b9..9280376 100644 --- a/loko/assets/static/assets/unified_index.js +++ b/loko/assets/static/assets/unified_index.js @@ -53,6 +53,7 @@ var assetsLoadModes = {}; // thematic_code → null | 'always' | 'filter' | // MapLibre sources var mergedLocationsGeojson = { type: 'FeatureCollection', features: [] }; +var mergedManagementZonesGeojson = { type: 'FeatureCollection', features: [] }; var mergedAssetsGeojson = { type: 'FeatureCollection', features: [] }; var currentFetchAbortController = null; var assetClickPopup = null; @@ -2805,7 +2806,7 @@ function rebuildMapSources() { const locSrc = map.getSource('locations'); const asstSrc = map.getSource('assets'); const zoneSrc = map.getSource('management_zones'); - if (!locSrc || !asstSrc) return; // sources not yet added (before mapLoaded) + if (!locSrc || !asstSrc || !zoneSrc) return; // sources not yet added (before mapLoaded) mergedLocationsGeojson = { type: 'FeatureCollection',