aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-07-22 17:45:38 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-07-22 17:45:38 +0200
commitffffdc0cd1d29c3f3a3449f26c9fec4c85ff6c8e (patch)
tree0cb85599b3a74ef7f95184c44b2f014a922901e6
parent35c6975a88439716901c3bdbd3f2f497ab56fa42 (diff)
Don't crash when clicking a feature in a layer group which didn't opt in for popover.
Such as `adm.*`.
-rw-r--r--main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.js b/main.js
index ff7dec9..49df160 100644
--- a/main.js
+++ b/main.js
@@ -5305,7 +5305,7 @@ const disposePopover = (function() {
const layerGroup = layer.get('layerGroup');
const layerName = feature.getProperties().layer;
mapSources[layerGroup] ??= layer.getSource();
- const def = layerName != null ? layers[layerGroup][layerName] : null;
+ const def = layerName != null ? layers[layerGroup]?.[layerName] : null;
if (def?.fields == null) {
/* skip layers which didn't opt-in for popover */
return false;