If running unload causes any hash changes, those should
not end up on the new URL.
Fixes #622
var path = url.replace(/#.*/, ''),
route = routes.recognize(path);
if (!route) return false;
var path = url.replace(/#.*/, ''),
route = routes.recognize(path);
if (!route) return false;
- window.history.pushState(OSM.parseHash(url), document.title, url);
currentRoute.run('unload');
currentRoute.run('unload');
+ window.history.pushState(OSM.parseHash(url), document.title, url);
currentPath = path;
currentRoute = route;
currentRoute.run('pushstate', currentPath);
currentPath = path;
currentRoute = route;
currentRoute.run('pushstate', currentPath);