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