Skip to content

Commit

Permalink
fix: Fallback to using route's name if chunkName empty
Browse files Browse the repository at this point in the history
Closes #52
  • Loading branch information
paulgv committed Mar 26, 2018
1 parent 65755d9 commit 0969229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const generateRoutes = ({
locales.forEach((locale) => {
const { component, chunkName } = baseRoute
let { path, name, children } = baseRoute
const cleanChunkName = chunkName.replace(/^pages\//, '')
const cleanChunkName = chunkName ? chunkName.replace(/^pages\//, '') : name
if (children) {
children = generateRoutes({
baseRoutes: children,
Expand Down

0 comments on commit 0969229

Please sign in to comment.