refactored error handling around getNavigationMap
This commit is contained in:
parent
159f730d6a
commit
98b872a81a
1 changed files with 3 additions and 5 deletions
|
|
@ -99,10 +99,7 @@ function navigate (scenario, currentRoute, optionalQuery = {}, optionalParams =
|
|||
if (!matchingScenarioMap){
|
||||
console.error("No matching scenario found. Please review the routing table.");
|
||||
return;
|
||||
} else if (matchingScenarioMap && matchingScenarioMap.error ) {
|
||||
console.error(matchingScenarioMap.error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (matchingScenarioMap.destinationIssPageValue) {
|
||||
// We're always pushing the same path, just changing query strings. Make sure our optional query strings get combined with our issPage one.
|
||||
|
|
@ -146,7 +143,8 @@ function getNavigationMap (scenario, currentRoute) {
|
|||
return maps ? maps.filter(x => x.filter === true || x.filter === undefined)[0] : undefined;
|
||||
}
|
||||
catch (e) {
|
||||
return { error: e };
|
||||
console.error(e);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue