Skip to content

Commit

Permalink
Merge pull request #20 from privy-open-source/fix/cdn
Browse files Browse the repository at this point in the history
fix(cdn): change cdn server to unpkg
  • Loading branch information
radyakaze authored May 2, 2024
2 parents a247af0 + a45479f commit d89b3c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/pdf-viewers/utils/use-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function useViewer(container: Ref<HTMLDivElement>, viewer: Ref<HTMLDivEle
pdfJS.value = await import('pdfjs-dist')

if (typeof window !== 'undefined' && 'Worker' in window)
pdfJS.value.GlobalWorkerOptions.workerSrc = `https://cdn.jsdelivr.net/npm/pdfjs-dist@${pdfJS.value.version}/build/pdf.worker.min.js`
pdfJS.value.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${pdfJS.value.version}/build/pdf.worker.min.js`

// Close previous document
await closeDoc()
Expand All @@ -44,7 +44,7 @@ export function useViewer(container: Ref<HTMLDivElement>, viewer: Ref<HTMLDivEle
pdfLoadingTask.value = pdfJS.value.getDocument({
url: url,
password: password,
cMapUrl: `https://cdn.jsdelivr.net/npm/pdfjs-dist@${pdfJS.value.version}/cmaps/`,
cMapUrl: `https://unpkg.com/pdfjs-dist@${pdfJS.value.version}/cmaps/`,
cMapPacked: true,
disableStream: false
})
Expand Down

0 comments on commit d89b3c7

Please sign in to comment.