X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8f7f02b025f59db466fdb22ea3686cb6c5adc400..a9dcb66e7b835a45902e1257f47be3f625389831:/app/assets/javascripts/leaflet.layers.js diff --git a/app/assets/javascripts/leaflet.layers.js b/app/assets/javascripts/leaflet.layers.js index 3f577b532..a7a2335f3 100644 --- a/app/assets/javascripts/leaflet.layers.js +++ b/app/assets/javascripts/leaflet.layers.js @@ -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); });