fix crash on release

This commit is contained in:
Mylloon 2024-11-28 14:54:04 +01:00
parent 28192ac8c0
commit c1dbbfb904
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -98,15 +98,14 @@ const searchFiles = (query, parent, currentFile) => {
return;
}
children.forEach((item) => {
for (const item in children) {
if (item.innerText.toLowerCase().includes(query.toLowerCase())) {
item.style.display = "";
uncollapse(item);
console.log(query, item.innerText);
} else {
continue;
}
item.style.display = "none";
}
});
};
window.addEventListener("load", () => {
@ -157,11 +156,12 @@ window.addEventListener("load", () => {
fileTreeElement.style.display = "block";
content.style.display = "none";
button.textContent = "Fermer le menu";
} else {
return;
}
fileTreeElement.style.display = "";
content.style.display = "";
button.textContent = initialButtonTextContent;
}
};
button.addEventListener("click", resetPage);