diff --git a/generators/app/index.js b/generators/app/index.js index 959c189f..478b7bc6 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -305,16 +305,14 @@ module.exports = class extends Generator { const file = constants.LICENSE_FILES[this.config.get('license')]; - if (!file) { - return; + if (file) { + this.fs.copyTpl( + this.templatePath(file), + this.destinationPath('LICENSE'), + this.context + ); } - this.fs.copyTpl( - this.templatePath(file), - this.destinationPath('LICENSE'), - this.context - ); - const json = packageJSON(this._currentPkgJSON, this.context); // We want to use normal JSON.stringify here because we want to