n8n/patches/pdf-parse@2.4.5.patch
Luigi Gubello a8880cb449
chore: Update pdfjs-dist to 6.3.289 (#40677)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:13:43 +00:00

15 lines
586 B
Diff

diff --git a/dist/pdf-parse/esm/PDFParse.js b/dist/pdf-parse/esm/PDFParse.js
index c7db69f699ac425e7fab7c2bb35422270e6b9699..36ea71b340258ba1101dee46fb2bf1822b64ccfa 100644
--- a/dist/pdf-parse/esm/PDFParse.js
+++ b/dist/pdf-parse/esm/PDFParse.js
@@ -32,7 +32,8 @@ export class PDFParse {
}
async destroy() {
if (this.doc) {
- await this.doc.destroy();
+ // pdfjs-dist 6 removed PDFDocumentProxy.destroy(); destroy the loading task instead.
+ await this.doc.loadingTask.destroy();
this.doc = undefined;
}
}