Skip to content

Commit df9fea2

Browse files
Fix expand/collapse on source viewer sidebar folders
1 parent ae2aa18 commit df9fea2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/html/static/js/source-script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ function createDirEntry(elem, parent, fullPath, currentFile, hasFoundFile) {
3232
fullPath += elem["name"] + "/";
3333

3434
name.onclick = () => {
35-
if (hasClass(this, "expand")) {
36-
removeClass(this, "expand");
35+
if (hasClass(name, "expand")) {
36+
removeClass(name, "expand");
3737
} else {
38-
addClass(this, "expand");
38+
addClass(name, "expand");
3939
}
4040
};
4141
name.innerText = elem["name"];

0 commit comments

Comments
 (0)