- if (path === currentPath) return;
- currentRoute.run('unload', null, route === currentRoute);
- currentPath = path;
- currentRoute = route;
- currentRoute.run('popstate', currentPath);
- map.setState(e.originalEvent.state, {animate: false});
- });
-
- router.route = function (url) {
- var path = url.replace(/#.*/, ''),
+ if (path === currentPath) return;
+ currentRoute.run("unload", null, route === currentRoute);
+ currentPath = path;
+ currentRoute = route;
+ currentRoute.run("popstate", currentPath);
+ map.setState(e.originalEvent.state, { animate: false });
+ });
+
+ router.route = function (url) {
+ var path = url.replace(/#.*/, ""),