fix `undefined` when options has no description
When an option doesn't have a description `undefined` prefixes the (Supported by ...) declaration in the settings
This commit is contained in:
parent
5da5b2be51
commit
3d490658e1
|
@ -133,9 +133,9 @@ buildOptionsForBeautifiers = function(beautifiers, allLanguages) {
|
|||
return _.reduce(languageOptions, (function(result, optionDef, optionName) {
|
||||
optionDef.beautifiers = _.uniq(optionDef.beautifiers)
|
||||
if (optionDef.beautifiers.length > 0) {
|
||||
optionDef.description = optionDef.description + " (Supported by " + (optionDef.beautifiers.join(', ')) + ")";
|
||||
optionDef.description = (optionDef.description || "") + " (Supported by " + (optionDef.beautifiers.join(', ')) + ")";
|
||||
} else {
|
||||
optionDef.description = optionDef.description + " (Not supported by any beautifiers)";
|
||||
optionDef.description = (optionDef.description || "") + " (Not supported by any beautifiers)";
|
||||
}
|
||||
if (result[optionName] != null) {
|
||||
logger.warn("Duplicate option detected: ", optionName, optionDef);
|
||||
|
|
Loading…
Reference in New Issue