mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #14265 from calixteman/14150
XFA - Avoid an exception when looking for a font in a parent node
This commit is contained in:
commit
7d6d3fc124
3 changed files with 11 additions and 1 deletions
|
@ -238,7 +238,7 @@ function layoutNode(node, availableSpace) {
|
|||
if (!font) {
|
||||
const root = node[$getTemplateRoot]();
|
||||
let parent = node[$getParent]();
|
||||
while (parent !== root) {
|
||||
while (parent && parent !== root) {
|
||||
if (parent.font) {
|
||||
font = parent.font;
|
||||
break;
|
||||
|
|
1
test/pdfs/xfa_issue14150.pdf.link
Normal file
1
test/pdfs/xfa_issue14150.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://github.com/mozilla/pdf.js/files/7528643/dol4n.pdf
|
|
@ -1013,6 +1013,15 @@
|
|||
"link": true,
|
||||
"type": "load"
|
||||
},
|
||||
{ "id": "xfa_issue14150",
|
||||
"file": "pdfs/xfa_issue14150.pdf",
|
||||
"md5": "295b3e513b62945fbba73bce6908344c",
|
||||
"link": true,
|
||||
"rounds": 1,
|
||||
"enableXfa": true,
|
||||
"lastPage": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_issue14071",
|
||||
"file": "pdfs/xfa_issue14071.pdf",
|
||||
"md5": "7ef09705091602668ce22086c83a90f3",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue