]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.layers.js
Merge branch 'pull/5631'
[rails.git] / app / assets / javascripts / leaflet.layers.js
index 3f577b532d3ba707dbf487277ce17d2bb1592883..a7a2335f3d843fedff03c1816aea7cc00184dd23 100644 (file)
@@ -60,11 +60,11 @@ L.OSM.layers = function (options) {
       });
 
       input.on("click", function () {
-        layers.forEach(function (other) {
+        for (const other of layers) {
           if (other !== layer) {
             map.removeLayer(other);
           }
-        });
+        }
         map.addLayer(layer);
       });