mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix(utils): trailingSlash
causes error with dynamic nuxt-child routes (#9505)
This commit is contained in:
parent
0742f59e24
commit
20f481f6f8
@ -56,7 +56,7 @@ function cleanChildrenRoutes (routes, isChild = false, routeNameSplitter = '-',
|
||||
route.path = isChild ? route.path.replace('/', '') : route.path
|
||||
if (route.path.includes('?')) {
|
||||
if (route.name.endsWith(`${routeNameSplitter}index`)) {
|
||||
route.path = route.path.replace(/\?$/, '')
|
||||
route.path = route.path.replace(/\?\/?$/, trailingSlash ? '/' : '')
|
||||
}
|
||||
const names = route.name.replace(regExpParentRouteName, '').split(routeNameSplitter)
|
||||
const paths = route.path.split('/')
|
||||
|
Loading…
Reference in New Issue
Block a user