Prevent error when switching from reader to library

This commit is contained in:
Abe Jellinek 2024-01-02 12:20:12 -08:00 committed by Dan Stillman
parent 9892601153
commit 9a07c8cb2e

View file

@ -160,11 +160,13 @@
get _collapsed() {
let collapsible = this.container.closest('splitter:not([hidden="true"]) + *');
if (!collapsible) return false;
return collapsible.getAttribute('collapsed') === 'true';
}
set _collapsed(val) {
let collapsible = this.container.closest('splitter:not([hidden="true"]) + *');
if (!collapsible) return;
let splitter = collapsible.previousElementSibling;
if (val) {
collapsible.setAttribute('collapsed', 'true');