From 65bdef42a187496425eacf73dfa4119a28400552 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 15 Aug 2018 02:35:09 -0400 Subject: [PATCH] Fix double PDF when adding arXiv paper with Add Item by Identifier --- chrome/content/zotero/lookup.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/lookup.js b/chrome/content/zotero/lookup.js index c6371b1ef7..9218dcd81c 100644 --- a/chrome/content/zotero/lookup.js +++ b/chrome/content/zotero/lookup.js @@ -68,9 +68,11 @@ var Zotero_Lookup = new function () { libraryID, collections: collection ? [collection.id] : false }); + // If we don't yet have a file, check for available PDFs if (Zotero.Prefs.get('downloadAssociatedFiles') - && !newItems.find(x => x.isImportedAttachment()) + && newItems[0] + && !newItems[0].numPDFAttachments() // TEMP: Limit to dev builds && Zotero.isDevBuild) { try {