Skip to content

Commit 06a15bb

Browse files
fix: first render error caused by page proxy undefined on first render
1 parent 1103681 commit 06a15bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Components/PDFPage.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ export default {
4949
},
5050
async render() {
5151
const _page = await this.page
52+
53+
if(typeof _page ==='undefined') return
54+
5255
const canvas = this.$refs.canvas
5356
const context = canvas.getContext('2d')
5457
const viewport = _page.getViewport({

0 commit comments

Comments
 (0)