File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -71,17 +71,16 @@ async function init() {
71
71
} )
72
72
73
73
// if any of the feature flags is set, we would skip the feature prompts
74
- // use `??` instead of `||` once we drop Node.js 12 support
75
74
const isFeatureFlagsUsed =
76
75
typeof (
77
- argv . default ||
78
- argv . ts ||
79
- argv . jsx ||
80
- argv . router ||
81
- argv . pinia ||
82
- argv . tests ||
83
- argv . vitest ||
84
- argv . cypress ||
76
+ argv . default ??
77
+ argv . ts ??
78
+ argv . jsx ??
79
+ argv . router ??
80
+ argv . pinia ??
81
+ argv . tests ??
82
+ argv . vitest ??
83
+ argv . cypress ??
85
84
argv . eslint
86
85
) === 'boolean'
87
86
@@ -227,7 +226,7 @@ async function init() {
227
226
// so we still have to assign the default values here
228
227
const {
229
228
projectName,
230
- packageName = projectName || defaultProjectName ,
229
+ packageName = projectName ?? defaultProjectName ,
231
230
shouldOverwrite = argv . force ,
232
231
needsJsx = argv . jsx ,
233
232
needsTypeScript = argv . typescript ,
@@ -380,7 +379,7 @@ async function init() {
380
379
fs . writeFileSync (
381
380
path . resolve ( root , 'README.md' ) ,
382
381
generateReadme ( {
383
- projectName : result . projectName || defaultProjectName ,
382
+ projectName : result . projectName ?? defaultProjectName ,
384
383
packageManager,
385
384
needsTypeScript,
386
385
needsVitest,
You can’t perform that action at this time.
0 commit comments