]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/osm.js.erb
Merge remote-tracking branch 'openstreetmap/pull/1099'
[rails.git] / app / assets / javascripts / osm.js.erb
index 61c2d1e6b9faebe220fd4b26bf9b8d18b8e5689f..6a8b856bee2beaf155122cfcbb760a47e4931c64 100644 (file)
@@ -1,3 +1,5 @@
+//= depend_on application.yml
+
 OSM = {
 <% if defined?(PIWIK) %>
   PIWIK:                 <%= PIWIK.to_json %>,
@@ -51,7 +53,12 @@ OSM = {
         j = pair.indexOf('='),
         key = pair.slice(0, j),
         val = pair.slice(++j);
-      params[key] = decodeURIComponent(val);
+
+      try {
+        params[key] = decodeURIComponent(val);
+      } catch (e) {
+        // Ignore parse exceptions
+      }
     }
 
     return params;