mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 06:38:07 +02:00
Merge pull request #19499 from Snuffleupagus/useWorkerFetch-ensure-boolean
Ensure that the `useWorkerFetch` fallback value is always a boolean
This commit is contained in:
commit
33c97570f5
1 changed files with 4 additions and 2 deletions
|
@ -331,7 +331,8 @@ function getDocument(src = {}) {
|
|||
typeof src.useWorkerFetch === "boolean"
|
||||
? src.useWorkerFetch
|
||||
: (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) ||
|
||||
(CMapReaderFactory === DOMCMapReaderFactory &&
|
||||
!!(
|
||||
CMapReaderFactory === DOMCMapReaderFactory &&
|
||||
StandardFontDataFactory === DOMStandardFontDataFactory &&
|
||||
WasmFactory === DOMWasmFactory &&
|
||||
cMapUrl &&
|
||||
|
@ -339,7 +340,8 @@ function getDocument(src = {}) {
|
|||
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 =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue