mirror of
https://github.com/zotero/zotero.git
synced 2026-09-28 01:31:40 +00:00
citation dialog: deduplicate open items (#5105)
So that if there are multiple tabs opened for the same top level item, it appears only once in search results.
This commit is contained in:
parent
92d6e69b6e
commit
ebdeab4b3e
1 changed files with 3 additions and 1 deletions
|
|
@ -248,7 +248,9 @@ export class CitationDialogSearchHandler {
|
|||
}
|
||||
return Zotero.Cite.getItem(itemID);
|
||||
});
|
||||
return items;
|
||||
// Return deduplicated items since there may be multiple tabs opened for the same
|
||||
// top-level item (duplicate tabs or a multiple attachments belonging to the same item)
|
||||
return [...new Set(items)];
|
||||
}
|
||||
|
||||
_getSelectedLibraryItems() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue