Merge pull request #455 from JeLuF/util-js

Fix: Uncaught TypeError: Cannot set properties of null
This commit is contained in:
cmdr2 2022-11-09 08:22:46 +05:30 committed by GitHub
commit 16d6644573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,11 +31,15 @@ function toggleCollapsible(element) {
let content = getNextSibling(collapsibleHeader, '.collapsible-content')
if (content.style.display === "block") {
content.style.display = "none"
if (handle != null) { // render results don't have a handle
handle.innerHTML = '➕' // plus
}
} else {
content.style.display = "block"
if (handle != null) { // render results don't have a handle
handle.innerHTML = '➖' // minus
}
}
if (COLLAPSIBLES_INITIALIZED && COLLAPSIBLE_PANELS.includes(element)) {
saveCollapsibles()