Skip to content

Commit 02712e2

Browse files
committed
docs: use singular form
1 parent d820fb6 commit 02712e2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/guide/advanced/navigation-failures.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ When using a regular `router-link`, **none of these failures will log an error**
1313
_Navigation Failures_ are `Error` instances with a few extra properties. Among them, you can find a `type` property. This will allow you to check the type of the navigation failure:
1414

1515
```js
16-
import { NavigationFailureTypes } from 'vue-router'
16+
import { NavigationFailureType } from 'vue-router'
1717

1818
// trying to access an admin-only route
1919
router.push('/admin').catch(failure => {
2020
if (failure) {
21-
if (failure.type === NavigationFailureTypes.redirected) {
21+
if (failure.type === NavigationFailureType.redirected) {
2222
// show a small notification to the user
2323
showToast('Login in order to access the admin panel')
2424
}
2525
}
2626
})
2727
```
2828

29-
## `NavigationFailureTypes`
29+
## `NavigationFailureType`
3030

31-
`NavigationFailureTypes` exposes the following properties to differentiate _Navigation Failures_:
31+
`NavigationFailureType` exposes the following properties to differentiate _Navigation Failures_:
3232

3333
- `redirected`: `next(newLocation)` was called inside of a navigation guard to redirect somewhere else.
3434
- `aborted`: `next(false)` was called inside of a navigation guard to the navigation.
@@ -43,7 +43,7 @@ Apart from exposing a `type` property, all navigation failures expose `to` and `
4343
// given we are at `/`
4444
router.push('/admin').catch(failure => {
4545
if (failure) {
46-
if (failure.type === NavigationFailureTypes.redirected) {
46+
if (failure.type === NavigationFailureType.redirected) {
4747
failure.to.path // '/admin'
4848
failure.from.path // '/'
4949
}

0 commit comments

Comments
 (0)