diff --git a/packages/nuxt/src/app/components/nuxt-link.ts b/packages/nuxt/src/app/components/nuxt-link.ts index 13c9141b10..659001884b 100644 --- a/packages/nuxt/src/app/components/nuxt-link.ts +++ b/packages/nuxt/src/app/components/nuxt-link.ts @@ -113,14 +113,10 @@ export function defineNuxtLink (options: NuxtLinkOptions) { const resolvedPath = { ...to, + name: undefined, // named routes would otherwise always override trailing slash behavior path: applyTrailingSlashBehavior(path, options.trailingSlash) } - // named routes would otherwise always override trailing slash behavior - if ('name' in resolvedPath) { - delete resolvedPath.name - } - return resolvedPath }