Skip to content

Commit

Permalink
Merge pull request #6 from epadalkin/feature/fix_load_preview
Browse files Browse the repository at this point in the history
fix open preview
  • Loading branch information
tafonina committed Feb 23, 2023
2 parents e84518f + e5ad6bc commit 1d5722f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/core/src/components/document/PdfModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ export default {
this.pdfSrc = undefined
this.numPages = undefined
this.pdfSrc = pdf.createLoadingTask(this.src)
this.pdfSrc.then(pdf => {
this.pdfSrc.promise.then(pdf => {
this.numPages = pdf.numPages
this.loadingPdf = false
this.pdfSrc._worker.destroy()
}, (err) => {
this.loadingPdf = false
console.log(err)
Expand Down

0 comments on commit 1d5722f

Please sign in to comment.