mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxt): pass undefined
name when resolving trailing slash (#26358)
This commit is contained in:
parent
8d6eab4822
commit
c49d206647
@ -113,14 +113,10 @@ export function defineNuxtLink (options: NuxtLinkOptions) {
|
|||||||
|
|
||||||
const resolvedPath = {
|
const resolvedPath = {
|
||||||
...to,
|
...to,
|
||||||
|
name: undefined, // named routes would otherwise always override trailing slash behavior
|
||||||
path: applyTrailingSlashBehavior(path, options.trailingSlash)
|
path: applyTrailingSlashBehavior(path, options.trailingSlash)
|
||||||
}
|
}
|
||||||
|
|
||||||
// named routes would otherwise always override trailing slash behavior
|
|
||||||
if ('name' in resolvedPath) {
|
|
||||||
delete resolvedPath.name
|
|
||||||
}
|
|
||||||
|
|
||||||
return resolvedPath
|
return resolvedPath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user