]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/embed.js.erb
Merge pull request #5558 from tomhughes/var-let-const
[rails.git] / app / assets / javascripts / embed.js.erb
index 34a8b68bcf8740e880fcb6e7574ce8adc169e75b..aff13add80debee64834bcf9b8852a0c4201840e 100644 (file)
@@ -32,7 +32,7 @@ window.onload = function () {
 <% end %>
   };
 
 <% end %>
   };
 
-  var map = L.map("map");
+  const map = L.map("map");
   map.attributionControl.setPrefix("");
   map.removeControl(map.attributionControl);
 
   map.attributionControl.setPrefix("");
   map.removeControl(map.attributionControl);
 
@@ -80,7 +80,7 @@ L.Control.OSMReportAProblem = L.Control.Attribution.extend({
   },
 
   onAdd: function (map) {
   },
 
   onAdd: function (map) {
-    var container = L.Control.Attribution.prototype.onAdd.call(this, map);
+    const container = L.Control.Attribution.prototype.onAdd.call(this, map);
 
     map.on("moveend", this._update, this);
 
 
     map.on("moveend", this._update, this);