mirror of
https://github.com/zotero/zotero.git
synced 2026-10-03 02:21:49 +00:00
do not try to select deleted item in a collection (#5061)
After navigating to the collection from "Libraries and Collections" section of an item in the trash. Deleted item does not appear in actual collections and trying to select it will just re-select the trash. Fixes: #5060
This commit is contained in:
parent
a3ebb4ad41
commit
c049120efb
1 changed files with 6 additions and 1 deletions
|
|
@ -157,7 +157,12 @@ import { getCSSIcon } from 'components/icons';
|
|||
if (!disableClicky) {
|
||||
box.addEventListener('click', async () => {
|
||||
await ZoteroPane.collectionsView.selectByID(obj.treeViewID);
|
||||
await ZoteroPane.selectItem(contextItem.id);
|
||||
// Do not try to view deleted items in a collection.
|
||||
// They do not appear outside of trash, and selecting a deleted item
|
||||
// will re-open trash in collectionTree.
|
||||
if (!contextItem.deleted) {
|
||||
await ZoteroPane.selectItem(contextItem.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue