mirror of
https://github.com/zotero/zotero.git
synced 2026-10-22 05:24:03 +00:00
Simplify duplicate lookup DOI match guard
The Array.prototype.find() predicate already guarantees a non-empty DOI present in doiSet, so the extra doiSet.has() check in the following if-condition is redundant.
This commit is contained in:
parent
bc733a14a8
commit
5d65c64ea1
1 changed files with 1 additions and 1 deletions
|
|
@ -504,7 +504,7 @@ Zotero.Server.Connector.findExistingItemsByIdentifiers = async function (identif
|
|||
item.getField('DOI'),
|
||||
item.getExtraField('DOI')
|
||||
].map(doi => Zotero.Utilities.cleanDOI(doi)).find(doi => doi && doiSet.has(doi.toLowerCase()));
|
||||
if (itemDOI && doiSet.has(itemDOI.toLowerCase())) {
|
||||
if (itemDOI) {
|
||||
matchedFields.push('DOI');
|
||||
matchedIdentifiers.doi = itemDOI;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue