diff --git a/chrome/content/zotero/xpcom/pdfWorker/manager.js b/chrome/content/zotero/xpcom/pdfWorker/manager.js index 1e2c3113db..837db8fb68 100644 --- a/chrome/content/zotero/xpcom/pdfWorker/manager.js +++ b/chrome/content/zotero/xpcom/pdfWorker/manager.js @@ -188,6 +188,10 @@ class PDFWorker { }); } let attachmentPath = await attachment.getFilePathAsync(); + if (!attachmentPath) { + Zotero.warn("Not exporting missing file " + attachment.getFilePath()); + return 0; + } let buf = await IOUtils.read(attachmentPath); buf = new Uint8Array(buf).buffer;