mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
fix route optional
This commit is contained in:
parent
f490786fa3
commit
51da5569f8
@ -292,7 +292,7 @@ function cleanChildrenRoutes (routes, isChild = false) {
|
||||
if (/-index$/.test(route.name)) {
|
||||
parents.push(route.name)
|
||||
} else {
|
||||
if (parents.indexOf(route.name.split('-').slice(0, -1).join('-') + '-index') > -1) {
|
||||
if (hasIndex && parents.indexOf(route.name.split('-').slice(0, -1).join('-') + '-index') > -1) {
|
||||
route.path = route.path.replace('?', '')
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user