diff options
| -rw-r--r-- | main.js | 12 | 
1 files changed, 9 insertions, 3 deletions
@@ -3435,7 +3435,7 @@ const infoMetadataAccordions = [];            elem._legend.classList.add('d-none');          }        } -      if (elem.children !== undefined && elem.children.length > 0) { +      if (elem.children != null && elem.children.length > 0) {          setIndeterminateAndChecked(elem.children);        }      }); @@ -3591,8 +3591,14 @@ const infoMetadataAccordions = [];      const text0 = document.createTextNode(x.text);      label0.appendChild(text0); -    if (x.children === undefined || x.children.length === 0) { -      item.replaceChild(span0, header); +    if (x.children == null || x.children.length === 0) { +      span0.removeAttribute('data-bs-toggle'); +      span0.removeAttribute('data-bs-target'); +      item.replaceChildren(span0); +      if (x.type === 'switch') { +        span0.classList.add('form-switch'); +        input0.setAttribute('role', 'switch'); +      }      } else {        const body = document.createElement('div');        collapse.appendChild(body);  | 
