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