]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/router.js
Strip any trailing slash from the initial location
[rails.git] / app / assets / javascripts / router.js
index 8661f95dccc918ee95d18fd54d0242281445f2e5..5c444d46cccfc9bd20bf9ecedad65760ca3fa648 100644 (file)
@@ -91,7 +91,7 @@ OSM.Router = function(map, rts) {
     }
   };
 
-  var currentPath = window.location.pathname + window.location.search,
+  var currentPath = window.location.pathname.replace(/\/$/, "") + window.location.search,
     currentRoute = routes.recognize(currentPath),
     currentHash = location.hash || OSM.formatHash(map);