Commit 0c609cf
committed
fix(create): accept default package name when pressing Enter without typing
When the user presses Enter on the "Package name:" prompt without typing,
`@clack/core` passes `undefined` as the value to validate. The old condition
`value != null && value.length === 0` skipped `undefined`, causing validation
to fail with "Invalid package name". Changed to `value == null || value.length
=== 0` so both `undefined` and empty string are treated as "use the default".1 parent 6a05434 commit 0c609cf
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments