]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/osm.js.erb
Don't throw an exception if the hash doesn't contain a map argument
[rails.git] / app / assets / javascripts / osm.js.erb
index 392bf5e0c65254de7c3009d8d2c008807ef288c7..c41f040f33f7122339155577cab44495d0070705 100644 (file)
@@ -115,6 +115,10 @@ OSM = {
 
     hash = querystring.parse(hash);
 
+    if (!(map in hash)) {
+      return false;
+    }
+
     var args = hash.map.split("/");
     if (args.length !== 3) {
       return false;