]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs: typo (#1588)
authorRomero Lijkwan <romerolijkwan@gmail.com>
Fri, 28 Oct 2022 22:05:04 +0000 (00:05 +0200)
committerGitHub <noreply@github.com>
Fri, 28 Oct 2022 22:05:04 +0000 (00:05 +0200)
packages/docs/guide/advanced/navigation-guards.md

index cfd3d160469571d30e1a3c5269e9f9d090a70a3c..9c278869103b69e098f5de612260ec440adde686 100644 (file)
@@ -63,7 +63,7 @@ router.beforeEach(async (to, from) => {
 
 ### Optional third argument `next`
 
-In previous versions of Vue Router, it was also possible to use a _third argument_ `next`, this was a common source of mistakes and went through an [RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0037-router-return-guards.md#motivation) to remove it. However, it is still supported, meaning you can pass a third argument to any navigation guard. In that case, **you must call `next` exactly once** in any given pass through a navigation guard. It can appear more than once, but only if the logical paths have no overlap, otherwise the hook will never be resolved or produce errors. Here is **a bad example** of redirecting to user to `/login` if they are not authenticated:
+In previous versions of Vue Router, it was also possible to use a _third argument_ `next`, this was a common source of mistakes and went through an [RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0037-router-return-guards.md#motivation) to remove it. However, it is still supported, meaning you can pass a third argument to any navigation guard. In that case, **you must call `next` exactly once** in any given pass through a navigation guard. It can appear more than once, but only if the logical paths have no overlap, otherwise the hook will never be resolved or produce errors. Here is **a bad example** of redirecting the user to `/login` if they are not authenticated:
 
 ```js
 // BAD