Skip to content

Commit

Permalink
Fix nested routes children empty problem
Browse files Browse the repository at this point in the history
  • Loading branch information
MengWeiChen authored Dec 5, 2017
1 parent 79eba84 commit 8d8bd3d
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 8d8bd3d

Please sign in to comment.