Skip to content

Commit 3006617

Browse files
posvabencodezen
andauthored
Apply suggestions from code review
Co-authored-by: Ben Hong <[email protected]>
1 parent 783f8cc commit 3006617

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/guide/advanced/navigation-failures.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
55
When using `router-link`, Vue Router calls `router.push` to trigger a navigation. While the expected behavior for most links is to navigate a user to a new page, there are a few situations where users will remain on the same page:
66

7-
- We are already on the page we are trying to go to
7+
- Users are already on the page that they are trying to navigate to
88
- A [navigation guard](./navigation-guards.md) aborts the navigation by calling `next(false)`
99
- A [navigation guard](./navigation-guards.md) throws an error or calls `next(new Error())`
1010

11-
When using a regular `router-link`, **none of these failures will log an error**. However, if you are using `router.push` or `router.replace`, you might come across an _"Uncaught (in promise) Error"_ message followed by a more specific message in your console. Let's understand how to differentiate _Navigation Failures_.
11+
When using a `router-link` component, **none of these failures will log an error**. However, if you are using `router.push` or `router.replace`, you might come across an _"Uncaught (in promise) Error"_ message followed by a more specific message in your console. Let's understand how to differentiate _Navigation Failures_.
1212

1313
::: tip Background story
1414
In v3.2.0, _Navigation Failures_ were exposed through the two optional callbacks of `router.push`: `onComplete` and `onAbort`. Since version 3.1.0, `router.push` and `router.replace` return a _Promise_ if no `onComplete`/`onAbort` callback is provided. This _Promise_ resolves instead of invoking `onComplete` and rejects instead of invoking `onAbort`.

0 commit comments

Comments
 (0)