Skip to content

Commit

Permalink
Ensure parent object exists for afterBuild event.
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Jan 30, 2020
1 parent 75c1fb3 commit 5b9fd9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generators/output/toDisk.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module.exports = async (env, spinner) => {
await fs.copy(globalConfig.build.assets.source, `${outputDir}/${globalConfig.build.assets.destination}`)
}

if (typeof globalConfig.events.afterBuild === 'function') {
if (globalConfig.events && typeof globalConfig.events.afterBuild === 'function') {
const files = await glob(`${outputDir}/**/*.*`)
globalConfig.events.afterBuild(files)
}
Expand Down

0 comments on commit 5b9fd9f

Please sign in to comment.