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() {

View File

@ -0,0 +1 @@
https://github.com/mozilla/pdf.js/files/5669997/b49fe733-63e0-4972-8b47-3a05c2c8e881.pdf

View File

@ -2028,6 +2028,15 @@
"link": true,
"type": "eq"
},
{ "id": "issue12714",
"file": "pdfs/issue12714.pdf",
"md5": "f9ee31c74f9e342e95122b0b3bc84fa0",
"rounds": 1,
"firstPage": 2,
"lastPage": 2,
"link": true,
"type": "eq"
},
{ "id": "issue7872",
"file": "pdfs/issue7872.pdf",
"md5": "81781dfecfcb7e9cd9cc7e60f8b747b7",