Skip to content

Commit e532401

Browse files
committed
docs: remove extra if [skip ci]
1 parent 902c82d commit e532401

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

docs/guide/advanced/navigation-failures.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ import { NavigationFailureType, isNavigationFailure } from 'vue-router'
1919

2020
// trying to access the admin page
2121
router.push('/admin').catch(failure => {
22-
if (failure) {
23-
if (isNavigationFailure(failure, NavigationFailureType.redirected)) {
24-
// show a small notification to the user
25-
showToast('Login in order to access the admin panel')
26-
}
22+
if (isNavigationFailure(failure, NavigationFailureType.redirected)) {
23+
// show a small notification to the user
24+
showToast('Login in order to access the admin panel')
2725
}
2826
})
2927
```
@@ -43,7 +41,7 @@ If you omit the second parameter: `isNavigationFailure(failure)`, it will only c
4341

4442
## _Navigation Failures_'s properties
4543

46-
Apart from exposing a `type` property, all navigation failures expose `to` and `from` properties to reflect the current location as well as the target location for the navigation that failed:
44+
All navigation failures expose `to` and `from` properties to reflect the current location as well as the target location for the navigation that failed:
4745

4846
```js
4947
// trying to access the admin page

0 commit comments

Comments
 (0)