Fix: Uncaught TypeError: Cannot set properties of null

This commit is contained in:
JeLuF 2022-11-08 19:05:28 +01:00
parent 8f1d214b12
commit 38afc6e6f8

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()