Skip to content

Commit 1b7e22e

Browse files
fix: warm up pdf-elements worker from package
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent de1577d commit 1b7e22e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/helpers/pdfWorker.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
* SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5-
import { setWorkerPath } from '@libresign/pdf-elements'
6-
import pdfWorkerUrl from 'pdfjs-dist/legacy/build/pdf.worker.min.mjs?url'
5+
import { ensureWorkerReady } from '@libresign/pdf-elements'
76

87
let configured = false
98

@@ -12,5 +11,5 @@ export const ensurePdfWorker = (): void => {
1211
return
1312
}
1413
configured = true
15-
setWorkerPath(pdfWorkerUrl)
14+
void ensureWorkerReady()
1615
}

0 commit comments

Comments
 (0)