Skip to content

Commit

Permalink
Merge pull request #19499 from Snuffleupagus/useWorkerFetch-ensure-bo…
Browse files Browse the repository at this point in the history
…olean

Ensure that the `useWorkerFetch` fallback value is always a boolean
  • Loading branch information
timvandermeij authored Feb 16, 2025
2 parents 3f15e0c + 06e4580 commit 33c9757
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/display/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,17 @@ function getDocument(src = {}) {
typeof src.useWorkerFetch === "boolean"
? src.useWorkerFetch
: (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) ||
(CMapReaderFactory === DOMCMapReaderFactory &&
!!(
CMapReaderFactory === DOMCMapReaderFactory &&
StandardFontDataFactory === DOMStandardFontDataFactory &&
WasmFactory === DOMWasmFactory &&
cMapUrl &&
standardFontDataUrl &&
wasmUrl &&
isValidFetchUrl(cMapUrl, document.baseURI) &&
isValidFetchUrl(standardFontDataUrl, document.baseURI) &&
isValidFetchUrl(wasmUrl, document.baseURI));
isValidFetchUrl(wasmUrl, document.baseURI)
);

// Parameters only intended for development/testing purposes.
const styleElement =
Expand Down

0 comments on commit 33c9757

Please sign in to comment.