Skip to content

Commit 46e4bf7

Browse files
fix: initialize pdf worker before editor mount
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent f9610e4 commit 46e4bf7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/components/PdfEditor/PdfEditor.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ defineOptions({
132132
name: 'PdfEditor',
133133
})
134134
135+
// PDFElements expects the worker path to be available before its own mount.
136+
ensurePdfWorker()
137+
135138
const props = withDefaults(defineProps<{
136139
files?: PdfInput[]
137140
fileNames?: string[]
@@ -407,7 +410,6 @@ async function waitForPageRender(docIndex: number, pageIndex: number) {
407410
}
408411
409412
onMounted(() => {
410-
ensurePdfWorker()
411413
document.addEventListener('mouseup', scheduleSignerAddedCheck)
412414
document.addEventListener('touchend', scheduleSignerAddedCheck)
413415
document.addEventListener('keyup', scheduleSignerAddedCheck)

0 commit comments

Comments
 (0)