Fix mistake with Instance descriptions

Also added warning for description not found in master.
This commit is contained in:
J87 authored and GitHub committed 2021-11-22 09:36:20 +11:00
1 parent baf7dbfe0d
commit cc064c2fd1
1 file changed
+7 -3
+7 -3
View File
@@ -157,8 +157,12 @@ masterConfigCommands.add(new libCommand.Command({
let allConfigElements = "";
for (let group of response.serialized_config.groups) {
for (let [name, value] of Object.entries(group.fields)) {
let desc = libConfig.MasterConfig.groups.get(group.name)._definitions.get(name).description;
allConfigElements += `# ${desc}\n`;
let desc = "";
try {
desc += libConfig.MasterConfig.groups.get(group.name)._definitions.get(name).description;
} catch (err) {
desc += "No description found";
}
// split onto two lines for readability and es-lint
if (String(value) === "null") {
value = "";
@@ -434,7 +438,7 @@ instanceConfigCommands.add(new libCommand.Command({
}
let desc = "";
try {
desc += libConfig.MasterConfig.groups.get(group.name)._definitions.get(name).description;
desc += libConfig.InstanceConfig.groups.get(group.name)._definitions.get(name).description;
} catch (err) {
desc += "No description found";
}