mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #14658 from Snuffleupagus/api-validate-cMapUrl-standardFontDataUrl
Validate the `cMapUrl`/`standardFontDataUrl` parameters in `getDocument`
This commit is contained in:
commit
790735eaf1
1 changed files with 6 additions and 0 deletions
|
@ -338,6 +338,12 @@ function getDocument(src) {
|
|||
if (!Number.isInteger(params.maxImageSize)) {
|
||||
params.maxImageSize = -1;
|
||||
}
|
||||
if (typeof params.cMapUrl !== "string") {
|
||||
params.cMapUrl = null;
|
||||
}
|
||||
if (typeof params.standardFontDataUrl !== "string") {
|
||||
params.standardFontDataUrl = null;
|
||||
}
|
||||
if (typeof params.useWorkerFetch !== "boolean") {
|
||||
params.useWorkerFetch =
|
||||
params.CMapReaderFactory === DOMCMapReaderFactory &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue