Skip to content

Commit

Permalink
fix: fix demandOption no longer treats 'false' as truthy (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
bricss authored and bcoe committed Mar 22, 2017
1 parent e0b4efb commit c748dd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yargs.js
Expand Up @@ -567,7 +567,7 @@ function Yargs (processArgs, cwd, parentRequire) {
self.demand(key, demand)
}

if ('demandOption' in opt) {
if (opt.demandOption) {
self.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined)
}

Expand Down

0 comments on commit c748dd2

Please sign in to comment.