mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 06:06:10 +00:00
fix(documents): load the local PDF parser lazily so the vault routes stop crashing
The local content-extraction reader imported pdf-parse at module top level. pdf-parse pulls in pdfjs, whose module evaluation references the browser-only DOMMatrix global; on the server that reference throws during chunk instantiation and takes down every route sharing the chunk — the document list, upload, and search among them, so old and new documents alike fail to load. Move the parser to a lazy import() inside the extraction function (surface type kept as a type-only import). Verified under plain Node that the lazy path still extracts a real PDF text layer, so local indexing is unaffected.
This commit is contained in:
1 parent
403cdf8cab
commit
951db4947e
5 files changed
+26
-4
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "healthlog",
|
||||
"version": "1.28.0",
|
||||
"version": "1.28.1",
|
||||
"description": "Self-hosted personal-health-tracking PWA with Withings integration, AI insights, and doctor-report PDF export.",
|
||||
"license": "PolyForm-Noncommercial-1.0.0",
|
||||
"homepage": "https://healthlog.dev",
|
||||
|
||||
Reference in new issue
Block a user