Fix cannot read property of undefined when not building

This commit is contained in:
pimlie 2017-11-29 18:28:19 +01:00 committed by Pooya Parsa
parent 2e546b2dba
commit adc7260c76

View File

@ -38,11 +38,11 @@ export default class Generator {
// Call before hook
await this.nuxt.callHook('generate:before', this, this.options.generate)
// Add flag to set process.static
this.builder.forGenerate()
// Start build process
if (build) {
// Add flag to set process.static
this.builder.forGenerate()
// Start build process
await this.builder.build()
}