]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.key.js
Load pluralizers
[rails.git] / app / assets / javascripts / leaflet.key.js
index 937d9b0528127754462ac1b71874446507f4712d..45d22feede8f2eec566bbd05a996d195410b4327 100644 (file)
@@ -16,7 +16,10 @@ L.OSM.key = function (options) {
 
     function shown() {
       map.on("zoomend baselayerchange", update);
-      $section.load("/key", update);
+      fetch("/key")
+        .then(r => r.text())
+        .then(html => { $section.html(html); })
+        .then(update);
     }
 
     function hidden() {