Skip to content

Commit

Permalink
refactor: remove unnecessary checks (yarnpkg#6955)
Browse files Browse the repository at this point in the history
* refactor: remove unnecessary checks

* codestyle: remove unnecessary braces

* refactor: revert change in Git resolver
  • Loading branch information
DanielRuf authored and arcanis committed Feb 5, 2019
1 parent 7170bbf commit dac22dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/commands/help.js
Expand Up @@ -23,7 +23,7 @@ export function run(config: Config, reporter: Reporter, commander: Object, args:
const command = commands[commandName];
if (command) {
command.setFlags(commander);
const examples: Array<string> = ((command && command.examples) || []).map(example => ` $ yarn ${example}`);
const examples: Array<string> = (command.examples || []).map(example => ` $ yarn ${example}`);
if (examples.length) {
commander.on('--help', () => {
reporter.log(reporter.lang('helpExamples', reporter.rawText(examples.join('\n'))));
Expand Down

0 comments on commit dac22dd

Please sign in to comment.