Merge pull request #14658 from Snuffleupagus/api-validate-cMapUrl-standardFontDataUrl
Validate the `cMapUrl`/`standardFontDataUrl` parameters in `getDocument`
This commit is contained in:
commit
790735eaf1
@ -338,6 +338,12 @@ function getDocument(src) {
|
|||||||
if (!Number.isInteger(params.maxImageSize)) {
|
if (!Number.isInteger(params.maxImageSize)) {
|
||||||
params.maxImageSize = -1;
|
params.maxImageSize = -1;
|
||||||
}
|
}
|
||||||
|
if (typeof params.cMapUrl !== "string") {
|
||||||
|
params.cMapUrl = null;
|
||||||
|
}
|
||||||
|
if (typeof params.standardFontDataUrl !== "string") {
|
||||||
|
params.standardFontDataUrl = null;
|
||||||
|
}
|
||||||
if (typeof params.useWorkerFetch !== "boolean") {
|
if (typeof params.useWorkerFetch !== "boolean") {
|
||||||
params.useWorkerFetch =
|
params.useWorkerFetch =
|
||||||
params.CMapReaderFactory === DOMCMapReaderFactory &&
|
params.CMapReaderFactory === DOMCMapReaderFactory &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user