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,10 +31,14 @@ function toggleCollapsible(element) {
let content = getNextSibling(collapsibleHeader, '.collapsible-content') let content = getNextSibling(collapsibleHeader, '.collapsible-content')
if (content.style.display === "block") { if (content.style.display === "block") {
content.style.display = "none" content.style.display = "none"
handle.innerHTML = '➕' // plus if (handle != null) { // render results don't have a handle
handle.innerHTML = '➕' // plus
}
} else { } else {
content.style.display = "block" content.style.display = "block"
handle.innerHTML = '➖' // minus if (handle != null) { // render results don't have a handle
handle.innerHTML = '➖' // minus
}
} }
if (COLLAPSIBLES_INITIALIZED && COLLAPSIBLE_PANELS.includes(element)) { if (COLLAPSIBLES_INITIALIZED && COLLAPSIBLE_PANELS.includes(element)) {