Log failures to match a route for the initial path
This commit is contained in:
parent
b04339f699
commit
e18c3fd58d
1 changed files with 6 additions and 2 deletions
|
@ -169,8 +169,12 @@ OSM.Router = function(map, rts) {
|
|||
};
|
||||
|
||||
router.load = function() {
|
||||
var loadState = currentRoute.run('load', currentPath);
|
||||
router.stateChange(loadState || {});
|
||||
if (currentRoute) {
|
||||
var loadState = currentRoute.run('load', currentPath);
|
||||
router.stateChange(loadState || {});
|
||||
} else {
|
||||
console.log("Unable to match route for: " + currentPath);
|
||||
}
|
||||
};
|
||||
|
||||
map.on('moveend baselayerchange overlaylayerchange', router.updateHash);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue