From 4b64cc312cb5c8d565f68a9a8feed1355fa5b3ae Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 5 Sep 2018 14:41:13 -0400 Subject: [PATCH] Handle possible null file URL in Mendeley import --- chrome/content/zotero/import/mendeley/mendeleyImport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/import/mendeley/mendeleyImport.js b/chrome/content/zotero/import/mendeley/mendeleyImport.js index 8dc6ca83bb..0db93f8d00 100644 --- a/chrome/content/zotero/import/mendeley/mendeleyImport.js +++ b/chrome/content/zotero/import/mendeley/mendeleyImport.js @@ -111,7 +111,7 @@ Zotero_Import_Mendeley.prototype.translate = async function (options) { // If there's a single PDF file and a single PDF URL and the file exists, make an // imported_url attachment instead of separate file and linked_url attachments if (docURLs && docFiles) { - let pdfFiles = docFiles.filter(x => x.fileURL.endsWith('.pdf')); + let pdfFiles = docFiles.filter(x => x.fileURL && x.fileURL.endsWith('.pdf')); let pdfURLs = docURLs.filter(x => x.includes('pdf')); if (pdfFiles.length == 1 && pdfURLs.length == 1