include linked items in lib/collectionBox render (#4786)

So that they do not disappear after Libraries and Collections
section is collapsed and expanded.

Fixes: #4784
This commit is contained in:
abaevbog 2024-10-24 20:46:55 -07:00 committed by GitHub
parent 19977c69c4
commit 88e10cdace
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -235,8 +235,7 @@ import { getCSSIcon } from 'components/icons';
if (this._isAlreadyRendered()) return; if (this._isAlreadyRendered()) return;
this._body.replaceChildren(); this._body.replaceChildren();
for (let item of [this._item, ...this._linkedItems]) {
for (let item of [this._item]) {
this._addObject(Zotero.Libraries.get(item.libraryID), item); this._addObject(Zotero.Libraries.get(item.libraryID), item);
for (let collection of Zotero.Collections.get(item.getCollections())) { for (let collection of Zotero.Collections.get(item.getCollections())) {
this._addObject(collection, item); this._addObject(collection, item);