mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #15152 from Snuffleupagus/validate-Resources
Ensure that the /Resources-entry is actually a dictionary (issue 15150)
This commit is contained in:
commit
4b493c2c33
4 changed files with 60 additions and 1 deletions
|
@ -132,10 +132,12 @@ class Page {
|
|||
// For robustness: The spec states that a \Resources entry has to be
|
||||
// present, but can be empty. Some documents still omit it; in this case
|
||||
// we return an empty dictionary.
|
||||
const resources = this._getInheritableProperty("Resources");
|
||||
|
||||
return shadow(
|
||||
this,
|
||||
"resources",
|
||||
this._getInheritableProperty("Resources") || Dict.empty
|
||||
resources instanceof Dict ? resources : Dict.empty
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue