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

Merge pull request #12717 from Snuffleupagus/issue-12714

Ensure that the /Annots-entry, on /Page-instances, is actually an Array (issue 12714)
This commit is contained in:
Tim van der Meij 2020-12-10 23:06:59 +01:00 committed by GitHub
commit 00b4f86db3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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() {