Avoid metrics being entirely empty
This commit is contained in:
parent
6754b48e7d
commit
d116950a93
2 changed files with 6 additions and 2 deletions
|
|
@ -95,7 +95,11 @@ export class Metrics {
|
|||
}
|
||||
|
||||
this.#div.textContent = ""; // Remove children
|
||||
this.#div.append(folder.childrenToHtmlElements());
|
||||
if (folder.children.size == 0) {
|
||||
this.#div.append("There aren't yet any metrics");
|
||||
} else {
|
||||
this.#div.append(folder.childrenToHtmlElements());
|
||||
}
|
||||
|
||||
const inputs = this.#div.querySelectorAll<HTMLInputElement>("input");
|
||||
for (const input of inputs) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue