}
};
- var currentPath = window.location.pathname + window.location.search,
+ var currentPath = window.location.pathname.replace(/(.)\/$/, '$1') + window.location.search,
currentRoute = routes.recognize(currentPath),
currentHash = location.hash || OSM.formatHash(map);