simplify arrow func

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2018-06-18 19:32:12 +01:00
parent 85ddc0651b
commit 107802fa29
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 9 additions and 11 deletions

View File

@ -43,17 +43,15 @@ export default class CommandProvider extends AutocompleteProvider {
// if the query is just `/` (and the user hit TAB or waits), show them all COMMANDS otherwise FuzzyMatch them
const matches = query === '/' ? COMMANDS : this.matcher.match(command[1]);
return matches.map((result) => {
return {
// If the command is the same as the one they entered, we don't want to discard their arguments
completion: result.command === command[1] ? command[0] : (result.command + ' '),
component: <TextualCompletion
title={result.command}
subtitle={result.args}
description={_t(result.description)} />,
range,
};
});
return matches.map((result) => ({
// If the command is the same as the one they entered, we don't want to discard their arguments
completion: result.command === command[1] ? command[0] : (result.command + ' '),
component: <TextualCompletion
title={result.command}
subtitle={result.args}
description={_t(result.description)} />,
range,
}));
}
getName() {