Skip to content

Commit

Permalink
fix: under node 16
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 committed Aug 22, 2023
1 parent 177bcc7 commit b83b2b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ class AddPlugin {
this.templateList = this.options.templateList || boilerplateList;

this.template = this.options.template;
if (this.options.type) {
this.template = this.templateList[this.options.type]?.package;
if (this.options.type && this.templateList[this.options.type]) {
this.template = this.templateList[this.options.type].package;
}
if (!this.template) {
this.template = await this.userSelectTemplate();
Expand Down

0 comments on commit b83b2b4

Please sign in to comment.