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
@ -331,7 +331,8 @@ function getDocument(src = {}) {
|
|||||||
typeof src.useWorkerFetch === "boolean"
|
typeof src.useWorkerFetch === "boolean"
|
||||||
? src.useWorkerFetch
|
? src.useWorkerFetch
|
||||||
: (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) ||
|
: (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) ||
|
||||||
(CMapReaderFactory === DOMCMapReaderFactory &&
|
!!(
|
||||||
|
CMapReaderFactory === DOMCMapReaderFactory &&
|
||||||
StandardFontDataFactory === DOMStandardFontDataFactory &&
|
StandardFontDataFactory === DOMStandardFontDataFactory &&
|
||||||
WasmFactory === DOMWasmFactory &&
|
WasmFactory === DOMWasmFactory &&
|
||||||
cMapUrl &&
|
cMapUrl &&
|
||||||
@ -339,7 +340,8 @@ function getDocument(src = {}) {
|
|||||||
wasmUrl &&
|
wasmUrl &&
|
||||||
isValidFetchUrl(cMapUrl, document.baseURI) &&
|
isValidFetchUrl(cMapUrl, document.baseURI) &&
|
||||||
isValidFetchUrl(standardFontDataUrl, document.baseURI) &&
|
isValidFetchUrl(standardFontDataUrl, document.baseURI) &&
|
||||||
isValidFetchUrl(wasmUrl, document.baseURI));
|
isValidFetchUrl(wasmUrl, document.baseURI)
|
||||||
|
);
|
||||||
|
|
||||||
// Parameters only intended for development/testing purposes.
|
// Parameters only intended for development/testing purposes.
|
||||||
const styleElement =
|
const styleElement =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user