Skip to content

Commit

Permalink
Merge pull request nuxt-modules#1 from MengWeiChen/Fix-nested-routes-…
Browse files Browse the repository at this point in the history
…children-empty-problem

Fix nested routes children empty problem
  • Loading branch information
paulgv authored Dec 5, 2017
2 parents 79eba84 + 8d8bd3d commit 696b7c7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ const generateRoutes = ({ baseRoutes, locales, defaultLocale, routesOptions }) =
const { component } = baseRoute
let { path, name, children } = baseRoute
if (children) {
children = generateRoutes(children, [locale])
children = generateRoutes({
baseRoutes: children,
locales: [locale],
defaultLocale,
routesOptions
})
}
const { code } = locale
if (has(routesOptions, `${name}.${code}`)) {
Expand Down

0 comments on commit 696b7c7

Please sign in to comment.