Skip to content

Commit b9d88c8

Browse files
committed
refactor(generator): update this.prompt to use await instead of then fnc call
1 parent 5061b7e commit b9d88c8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

generators/app/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ module.exports = class extends Generator {
4949
},
5050
];
5151

52-
return this.prompt(prompts).then((props) => {
53-
this.props = {
54-
...props,
55-
elementName: changeCase.paramCase(props.elementName),
56-
elementOrganizationName: changeCase.paramCase(
57-
props.elementOrganizationName,
58-
),
59-
};
60-
});
52+
const props = await this.prompt(prompts);
53+
54+
this.props = {
55+
...props,
56+
elementName: changeCase.paramCase(props.elementName),
57+
elementOrganizationName: changeCase.paramCase(
58+
props.elementOrganizationName,
59+
),
60+
};
6161
}
6262

6363
writing() {

0 commit comments

Comments
 (0)