X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/78f8e2a4503f95e23c8312193aecfb20455fa01e..e418075e26d80d68e4127d3358a2d8b11dee3a13:/app/assets/javascripts/router.js?ds=sidebyside diff --git a/app/assets/javascripts/router.js b/app/assets/javascripts/router.js index 56616c269..cadb6b628 100644 --- a/app/assets/javascripts/router.js +++ b/app/assets/javascripts/router.js @@ -169,12 +169,8 @@ OSM.Router = function(map, rts) { }; router.load = function() { - if (currentRoute) { - var loadState = currentRoute.run('load', currentPath); - router.stateChange(loadState || {}); - } else { - throw "Unable to match route for: " + currentPath; - } + var loadState = currentRoute.run('load', currentPath); + router.stateChange(loadState || {}); }; map.on('moveend baselayerchange overlaylayerchange', router.updateHash);