Skip processing with PDF worker when exporting PDF without annotations
Some checks are pending
CI / Build, Upload, Test (push) Waiting to run

This commit is contained in:
Martynas Bagdonas 2024-09-02 14:40:06 +03:00
parent ce1061c2fb
commit 9b10164eac

View file

@ -206,6 +206,10 @@ class PDFWorker {
Zotero.warn("Not exporting missing file " + attachment.getFilePath());
return 0;
}
if (!annotations.length) {
await OS.File.copy(attachmentPath, path);
return 0;
}
let buf = await IOUtils.read(attachmentPath);
buf = new Uint8Array(buf).buffer;