1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Ensure that the /Annots-entry, on /Page-instances, is actually an Array (issue 12714)

In the referenced PDF document, the second and third page has *corrupt* /Annots-entries which contain /Dict-data rather than the intended Arrays.
This commit is contained in:
Jonas Jenwald 2020-12-10 11:31:46 +01:00
parent 93b3ba2abb
commit 796a0d3155
3 changed files with 12 additions and 5 deletions

View file

@ -437,11 +437,8 @@ class Page {
}
get annotations() {
return shadow(
this,
"annotations",
this._getInheritableProperty("Annots") || []
);
const annots = this._getInheritableProperty("Annots");
return shadow(this, "annotations", Array.isArray(annots) ? annots : []);
}
get _parsedAnnotations() {