Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve intent path to actual path #2286

Merged
merged 9 commits into from
Oct 8, 2021
6 changes: 5 additions & 1 deletion core/src/services/routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,12 @@ class RoutingClass {
if (/\?intent=/i.test(window.location.hash)) {
const hash = window.location.hash.replace('#/#', '').replace('#', '');
const intentPath = RoutingHelpers.getIntentPath(hash);
// if intent faulty or illegal then skip
if (intentPath) {
// if intent faulty or illegal then skip
const isReplaceRouteActivated = Luigi.getConfigValue('routing.replaceIntentRoute');
if (isReplaceRouteActivated) {
history.replaceState(window.state, '', intentPath);
}
return intentPath;
}
}
Expand Down
7 changes: 6 additions & 1 deletion docs/navigation-parameters-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,15 @@ You can configure the way Luigi tackles routing in your application in the `rout
- **default**: `false`

### disableBrowserHistory
- **type** booean
- **type** boolean
- **description**: defines either if browser history is enabled or not.
- **default**: `false`

### replaceIntentRoute
- **type** boolean
- **description**: defines if intent navigation route resolves to actual path automatically or not.
- **default**: `false`

## Navigation parameters
The navigation parameters allow you to configure **global** navigation settings directly under the `navigation:` section in the configuration file.

Expand Down