Skip to content

Commit

Permalink
fix(nuxt): pass undefined name when resolving trailing slash (#26358)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Mar 18, 2024
1 parent 8d6eab4 commit c49d206
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/nuxt/src/app/components/nuxt-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit c49d206

Please sign in to comment.