Handle possible null file URL in Mendeley import
This commit is contained in:
parent
01e2f32d03
commit
4b64cc312c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue