fixed 2 bugs related to parsing
This commit is contained in:
parent
e6c0c378de
commit
0a871023c8
1 changed files with 2 additions and 2 deletions
|
@ -45,10 +45,10 @@ function parseFlags(
|
|||
): void {
|
||||
for (let i = 0; i < argsNullable.length; i++) {
|
||||
if (entry.flag === argsNullable[i]) {
|
||||
argsNullable[i] = null
|
||||
args[entry.name] = true
|
||||
break
|
||||
} else args[entry.name] = entry.defaultValue ?? false;
|
||||
argsNullable[i] = null
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ function parseContent(
|
|||
argsNonNullable: Array<string | null>
|
||||
): void {
|
||||
args[entry.name] =
|
||||
argsNonNullable.length !== 0 ? argsNonNullable : entry.defaultValue
|
||||
argsNonNullable.length > 0 ? argsNonNullable : entry.defaultValue
|
||||
}
|
||||
|
||||
function parseRest(
|
||||
|
|
Loading…
Reference in a new issue