]> git.openstreetmap.org Git - rails.git/commitdiff
Strip any trailing slash from the initial location
authorTom Hughes <tom@compton.nu>
Sun, 1 Dec 2013 21:47:55 +0000 (21:47 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 1 Dec 2013 21:47:55 +0000 (21:47 +0000)
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);