Ensure that "local" /Contents stream-dict /Resources aren't empty (PR 19803 follow-up)
This is a small, and quite possibly pointless, optimization which ensures that any "local" /Resources aren't empty, to avoid needlessly trying to load and merge dictionaries.
This commit is contained in:
parent
2f7d163dfd
commit
245d9ba925
@ -427,7 +427,7 @@ class Page {
|
|||||||
// available (see issue18894.pdf).
|
// available (see issue18894.pdf).
|
||||||
const localResources = streamDict?.get("Resources");
|
const localResources = streamDict?.get("Resources");
|
||||||
|
|
||||||
if (!(localResources instanceof Dict)) {
|
if (!(localResources instanceof Dict && localResources.size)) {
|
||||||
return this.resources;
|
return this.resources;
|
||||||
}
|
}
|
||||||
const objectLoader = new ObjectLoader(localResources, keys, this.xref);
|
const objectLoader = new ObjectLoader(localResources, keys, this.xref);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user