mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Simplify a couple of isNodeJS
-dependent getDocument
default values
Given that the `isNodeJS`-constant will, after PR 14858, *always* be `false` in non-GENERIC builds we can simplify a couple of `getDocument`-parameter default values slightly. The old format, with inline `PDFJSDev`-checks, wasn't exactly a wonder of readability; which was my fault.
This commit is contained in:
parent
7df47c289f
commit
d4fe4fd97b
1 changed files with 2 additions and 7 deletions
|
@ -353,15 +353,10 @@ function getDocument(src) {
|
|||
params.isEvalSupported = true;
|
||||
}
|
||||
if (typeof params.disableFontFace !== "boolean") {
|
||||
params.disableFontFace =
|
||||
(typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) && isNodeJS;
|
||||
params.disableFontFace = isNodeJS;
|
||||
}
|
||||
if (typeof params.useSystemFonts !== "boolean") {
|
||||
params.useSystemFonts =
|
||||
!(
|
||||
(typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) &&
|
||||
isNodeJS
|
||||
) && !params.disableFontFace;
|
||||
params.useSystemFonts = !isNodeJS && !params.disableFontFace;
|
||||
}
|
||||
if (
|
||||
typeof params.ownerDocument !== "object" ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue