]> git.openstreetmap.org Git - rails.git/commitdiff
Fix stripping of trailing slash
authorTom Hughes <tom@compton.nu>
Sun, 1 Dec 2013 22:30:34 +0000 (22:30 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 1 Dec 2013 22:30:34 +0000 (22:30 +0000)
app/assets/javascripts/router.js

index 5c444d46cccfc9bd20bf9ecedad65760ca3fa648..cadb6b628f1b672fa9dd46aaa6a2adf5279ddca1 100644 (file)
@@ -91,7 +91,7 @@ OSM.Router = function(map, rts) {
     }
   };
 
-  var currentPath = window.location.pathname.replace(/\/$/, "") + window.location.search,
+  var currentPath = window.location.pathname.replace(/(.)\/$/, '$1') + window.location.search,
     currentRoute = routes.recognize(currentPath),
     currentHash = location.hash || OSM.formatHash(map);