fix deleted route name for parent

This commit is contained in:
Alexandre Chopin 2017-01-11 12:52:39 +01:00
parent 3d083afc3d
commit 538248a152

View File

@ -262,7 +262,9 @@ function cleanChildrenRoutes (routes, isChild = false) {
}
route.name = route.name.replace(/-index$/, '')
if (route.children) {
if (route.children.find((child) => child.path === '')) {
delete route.name
}
route.children = cleanChildrenRoutes(route.children, true)
}
})