Fix expand/collapse on source viewer sidebar folders

This commit is contained in:
Guillaume Gomez 2022-06-14 10:59:01 +02:00
parent ae2aa18d74
commit df9fea24a5

View file

@ -32,10 +32,10 @@ function createDirEntry(elem, parent, fullPath, currentFile, hasFoundFile) {
fullPath += elem["name"] + "/";
name.onclick = () => {
if (hasClass(this, "expand")) {
removeClass(this, "expand");
if (hasClass(name, "expand")) {
removeClass(name, "expand");
} else {
addClass(this, "expand");
addClass(name, "expand");
}
};
name.innerText = elem["name"];