Skip to content

Commit dcf44c1

Browse files
committedMay 29, 2019
misc(init-generator): small refactor
1 parent fb25bd2 commit dcf44c1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎packages/webpack-scaffold/index.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,13 @@ export function InputValidate(
9191
cb?: (input: string) => string | boolean,
9292
defaultChoice?: string,
9393
): Generator.Question {
94-
9594
const input: Generator.Question = {
9695
message,
9796
name,
9897
type: "input",
9998
validate: cb
10099
};
101-
if (defaultChoice !== undefined) input.default = defaultChoice;
100+
if (defaultChoice) input.default = defaultChoice;
102101
return input;
103102
}
104103

0 commit comments

Comments
 (0)
Please sign in to comment.