diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2025-05-27 14:58:09 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2025-05-27 14:58:20 +0200 |
commit | 1e67d1de88b5dcafe56db2a28c26750daa50c5f8 (patch) | |
tree | 0462e5224e2f39f781c5c01790da4a7bc8a76e23 | |
parent | 6c388d0b828e62562e43cecb801bb8979b593c1d (diff) |
Tighten split() limit argument.
-rw-r--r-- | main.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3320,7 +3320,7 @@ const [vectorLayers, featureOverlayLayer] = (function() { const fixLayerVisibility = function() { const result = {} Object.keys(layers).forEach(function(lyr) { - const layerGroup = lyr.split('_', 2)[0]; + const layerGroup = lyr.split('_', 1)[0]; if (result[layerGroup] === undefined) { result[layerGroup] = false; } @@ -3361,7 +3361,7 @@ const [vectorLayers, featureOverlayLayer] = (function() { fixLayerVisibility(); layerList - .map((l) => l.split('_', 2)[0]) + .map((l) => l.split('_', 1)[0]) .filter((v, i, arr) => arr.indexOf(v) === i) .forEach((l) => vectorLayers[l].getSource().changed()); |