From 2a2f21b84f6a793f47cc662f2d65faa05a1f0d20 Mon Sep 17 00:00:00 2001 From: DmitryVladimirson <58473490+DmitryVladimirson@users.noreply.github.com> Date: Mon, 12 Dec 2022 17:44:09 +0100 Subject: [PATCH] docs: indicate `navigateTo` options are optional (#9672) --- .../1.docs/2.guide/2.directory-structure/1.middleware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/1.docs/2.guide/2.directory-structure/1.middleware.md b/docs/content/1.docs/2.guide/2.directory-structure/1.middleware.md index e60f4aafcb..4441ff7479 100644 --- a/docs/content/1.docs/2.guide/2.directory-structure/1.middleware.md +++ b/docs/content/1.docs/2.guide/2.directory-structure/1.middleware.md @@ -36,7 +36,7 @@ export default defineNuxtRouteMiddleware((to, from) => { Nuxt provides two globally available helpers that can be returned directly from the middleware: -1. `navigateTo (to: RouteLocationRaw | undefined | null, options: { replace: boolean, redirectCode: number, external: boolean )` - Redirects to the given route, within plugins or middleware. It can also be called directly to perform page navigation. +1. `navigateTo (to: RouteLocationRaw | undefined | null, options?: { replace: boolean, redirectCode: number, external: boolean )` - Redirects to the given route, within plugins or middleware. It can also be called directly to perform page navigation. 2. `abortNavigation (err?: string | Error)` - Aborts the navigation, with an optional error message. Unlike navigation guards in [the vue-router docs](https://router.vuejs.org/guide/advanced/navigation-guards.html#global-before-guards), a third `next()` argument is not passed, and redirects or route cancellation is handled by returning a value from the middleware. Possible return values are: