diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2025-07-22 17:45:38 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2025-07-22 17:45:38 +0200 |
commit | ffffdc0cd1d29c3f3a3449f26c9fec4c85ff6c8e (patch) | |
tree | 0cb85599b3a74ef7f95184c44b2f014a922901e6 | |
parent | 35c6975a88439716901c3bdbd3f2f497ab56fa42 (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.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |