Skip to content

Commit

Permalink
fix(flags): standalone option could be combined with another standalo…
Browse files Browse the repository at this point in the history
…ne option
  • Loading branch information
c4spar committed May 21, 2020
1 parent e9e6aa5 commit cb91b85
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/flags/lib/validate-flags.ts
Expand Up @@ -48,7 +48,9 @@ export function validateFlags( flags: IFlagOptions[], values: IFlags, defaultVal
if ( keys.length > 1 ) {

// dont't throw an error if all values are coming from the default option.
if ( options.every( ( { option } ) => option && ( option.standalone || defaultValues[ option.name ] ) ) ) {
if ( options.every( ( { option: opt } ) => opt &&
( option === opt || defaultValues[ opt.name ] ) )
) {
return;
}

Expand Down

0 comments on commit cb91b85

Please sign in to comment.