Strip any trailing slash from the initial location

This commit is contained in:
Tom Hughes 2013-12-01 21:47:55 +00:00
parent 640ff57465
commit 96babc10b0

View 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);