From 1b61be71b902fa8a6d60a8500cc4136b919d878b Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 9 May 2025 10:36:26 -0400 Subject: [PATCH] isPaneCollapsed(): Use correct check We don't know if collapsibleParent is non-null, but we already know that its previous sibling is the splitter if it is. --- chrome/content/zotero/elements/utils/collapsiblePane.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/elements/utils/collapsiblePane.mjs b/chrome/content/zotero/elements/utils/collapsiblePane.mjs index d407dbe03a..6970d9598d 100644 --- a/chrome/content/zotero/elements/utils/collapsiblePane.mjs +++ b/chrome/content/zotero/elements/utils/collapsiblePane.mjs @@ -31,7 +31,7 @@ */ export function isPaneCollapsed(pane) { let collapsibleParent = pane.closest('splitter:not([hidden="true"]) + *'); - if (collapsibleParent.previousElementSibling?.localName !== 'splitter') { + if (!collapsibleParent) { return false; } return collapsibleParent.getAttribute('collapsed') === 'true';