Skip to content

Commit 10ba9ed

Browse files
committed
fix: Fix TypeError: Cannot read property 'pages' of undefined in extendRoutes
Fixes #113
1 parent 16a4cba commit 10ba9ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/module.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ export default function (userOptions) {
5656
}
5757

5858
// Generate localized routes
59+
const pagesDir = this.options.dir && this.options.dir.pages ? this.options.dir.pages : 'pages'
5960
this.extendRoutes((routes) => {
6061
const localizedRoutes = makeRoutes(routes, {
6162
...options,
62-
pagesDir: this.options.dir.pages
63+
pagesDir,
6364
})
6465
routes.splice(0, routes.length)
6566
routes.unshift(...localizedRoutes)

0 commit comments

Comments
 (0)