mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
Use empty array if routes not given
This commit is contained in:
parent
0a9477dc7b
commit
8cdd10274f
@ -52,11 +52,12 @@ export default function () {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// Resolve config.generate.routes promises before generating the routes
|
// Resolve config.generate.routes promises before generating the routes
|
||||||
return promisifyRoute(this.options.generate.routes)
|
return promisifyRoute(this.options.generate.routes || [])
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.error(`Could not resolve routes`) // eslint-disable-line no-console
|
console.error('Could not resolve routes') // eslint-disable-line no-console
|
||||||
console.error(e) // eslint-disable-line no-console
|
console.error(e) // eslint-disable-line no-console
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
|
throw e
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then((generateRoutes) => {
|
.then((generateRoutes) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user