getTemplate help fix

This commit is contained in:
saifullah-N
2022-12-23 12:02:44 +05:30
parent b4ec4c329e
commit 48d2ff1aa2

View File

@@ -17,7 +17,7 @@
min?: number;
max?: number;
step?: number;
help?: string | undefined;
help?: string;
default?: string | number;
scale?: number;
};
@@ -65,13 +65,15 @@
let template = configTemplate;
for (const part of keyParts) {
template = template[part];
if(!template.help)
template.help=""
}
return template as Template;
}
function getTitle(): string {
const help = (!!template.help) ? `${template.help}\n` : "";
// const help = (!!template.help) ? `${template.help}\n` : "";
return `${help}Default: ${template.default} ${template.unit || ""}`;
}