Skip to content

Commit

Permalink
fix(add): fix runTransform
Browse files Browse the repository at this point in the history
rephrase question
  • Loading branch information
rishabh3112 committed Mar 19, 2019
1 parent 163b309 commit dbc3e9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/generators/add-generator.ts
Expand Up @@ -164,9 +164,11 @@ export default class AddGenerator extends Generator {
} else {
if (action === "topScope") {
return this.prompt([
Input("topScope", "Enter line you want to add to topScope"),
Input("topScope", "What do you want to add to topScope?"),
])
.then((topScopeAnswer) => {
.then((topScopeAnswer: {
topScope: string
}) => {
this.configuration.config.topScope.push(topScopeAnswer.topScope);
done();
});
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/scaffold.ts
Expand Up @@ -44,7 +44,7 @@ export default function runTransform(transformConfig: ITransformConfig, action:

const transformations: string[] = mapOptionsToTransform(config);

if (config.topScope) {
if (config.topScope && transformations.indexOf("topScope") === -1) {
transformations.push("topScope");
}

Expand Down

0 comments on commit dbc3e9e

Please sign in to comment.