From dac22ddfea657946f5c2943cab69bff7dae63ebc Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Tue, 5 Feb 2019 20:13:02 +0100 Subject: [PATCH] refactor: remove unnecessary checks (#6955) * refactor: remove unnecessary checks * codestyle: remove unnecessary braces * refactor: revert change in Git resolver --- src/cli/commands/help.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/commands/help.js b/src/cli/commands/help.js index 7405707132..7d77dd379d 100644 --- a/src/cli/commands/help.js +++ b/src/cli/commands/help.js @@ -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 = ((command && command.examples) || []).map(example => ` $ yarn ${example}`); + const examples: Array = (command.examples || []).map(example => ` $ yarn ${example}`); if (examples.length) { commander.on('--help', () => { reporter.log(reporter.lang('helpExamples', reporter.rawText(examples.join('\n'))));