diff options
Diffstat (limited to 'src/librustdoc/html/static/js/source-script.js')
| -rw-r--r-- | src/librustdoc/html/static/js/source-script.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/html/static/js/source-script.js b/src/librustdoc/html/static/js/source-script.js index 58c036e0b3c..14d8a942977 100644 --- a/src/librustdoc/html/static/js/source-script.js +++ b/src/librustdoc/html/static/js/source-script.js @@ -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"]; |
