Files
bookorbit/patches/@embedpdf__engines@2.15.1.patch
neon 09e4f1b5bd chore(deps): update minor and patch dependencies
Bump every direct dependency to its newest same-major release, moving the
embedpdf patches and packageExtensions to 2.15.1 and deduping the lockfile.
Hold jsdom at 30.0 because 30.1 breaks vitest's URL.createObjectURL shim,
and skip releases still inside pnpm's minimum release age.
2026-09-30 00:57:24 +00:00

22 lines
1.0 KiB
Diff

diff --git a/dist/lib/pdfium/web/worker-engine.js b/dist/lib/pdfium/web/worker-engine.js
index 1c40ef8dd3aa8050f3a23242d23258dbd04b3604..b81a6a9b879ecb4016a8ee1ad7da552f0ae5a13e 100644
--- a/dist/lib/pdfium/web/worker-engine.js
+++ b/dist/lib/pdfium/web/worker-engine.js
@@ -10,6 +10,16 @@ const _RemoteExecutor = class _RemoteExecutor {
this.requestCounter = 0;
this.handleMessage = (event) => {
const response = event.data;
+ if (response.type === "wasmError") {
+ const message = typeof response.error === "string" ? response.error : "Unknown worker initialization error";
+ this.logger.error(LOG_SOURCE$1, LOG_CATEGORY$1, "Worker initialization failed:", message);
+ this.readyTask.reject({
+ code: PdfErrorCode.Initialization,
+ message
+ });
+ this.pendingRequests.delete(_RemoteExecutor.READY_TASK_ID);
+ return;
+ }
if (response.type === "ready") {
this.logger.debug(LOG_SOURCE$1, LOG_CATEGORY$1, "Worker is ready");
this.readyTask.resolve(true);