From 9a07c8cb2ecc760b49659351c04c5e5cee6223d8 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 2 Jan 2024 12:20:12 -0800 Subject: [PATCH] Prevent error when switching from reader to library --- chrome/content/zotero/elements/itemPaneSidenav.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/elements/itemPaneSidenav.js b/chrome/content/zotero/elements/itemPaneSidenav.js index 2de28f0017..582185e3cd 100644 --- a/chrome/content/zotero/elements/itemPaneSidenav.js +++ b/chrome/content/zotero/elements/itemPaneSidenav.js @@ -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');