]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/embed.js.erb
Use location instead of window.location and document.location
[rails.git] / app / assets / javascripts / embed.js.erb
index aff13add80debee64834bcf9b8852a0c4201840e..7596e89a438dd3aa29ff17dedc4057167f05a12c 100644 (file)
@@ -16,7 +16,7 @@ I18n.default_locale = <%= I18n.default_locale.to_json %>;
 I18n.fallbacks = true;
 
 window.onload = function () {
 I18n.fallbacks = true;
 
 window.onload = function () {
-  const args = Object.fromEntries(new URLSearchParams(window.location.search));
+  const args = Object.fromEntries(new URLSearchParams(location.search));
 
   const tileOptions = {
     mapnik: {
 
   const tileOptions = {
     mapnik: {