From: Tom Hughes Date: Sun, 1 Dec 2013 21:47:55 +0000 (+0000) Subject: Strip any trailing slash from the initial location X-Git-Tag: live~5207 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/96babc10b0a3f2b834b047ecd9b48a3648ae4b43 Strip any trailing slash from the initial location --- diff --git a/app/assets/javascripts/router.js b/app/assets/javascripts/router.js index 8661f95dc..5c444d46c 100644 --- a/app/assets/javascripts/router.js +++ b/app/assets/javascripts/router.js @@ -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);