Skip to content

Commit

Permalink
fix(flags): fix default value
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Apr 4, 2020
1 parent 3c14011 commit 0244b50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/flags/lib/flags.ts
Expand Up @@ -112,7 +112,7 @@ export function parseFlags( args: string[], opts: IParseOptions = {} ): IFlagsRe

if ( typeof flags[ friendlyName ] === 'undefined' ) {

if ( option.default ) {
if ( typeof option.default !== 'undefined' ) {
flags[ friendlyName ] = option.default;
} else if ( option.args && option.args[ 0 ].optionalValue ) {
flags[ friendlyName ] = true;
Expand Down

0 comments on commit 0244b50

Please sign in to comment.