Skip to content

Commit

Permalink
fix: respect default value for negated options if presents (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu authored Feb 17, 2021
1 parent 15e9f80 commit f51fc22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class Option {
// Use the longest name (last one) as actual option name
this.name = this.names[this.names.length - 1]

if (this.negated) {
if (this.negated && this.config.default == null) {
this.config.default = true
}

Expand Down

0 comments on commit f51fc22

Please sign in to comment.