mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
[Annotation] Strip out the array index in the path only when the path is from a terminal node (bug 1847733)
This commit is contained in:
parent
19c712c2d0
commit
e2f20a1afe
5 changed files with 44 additions and 2 deletions
|
@ -1711,7 +1711,7 @@ class PDFDocument {
|
|||
name = name === "" ? partName : `${name}.${partName}`;
|
||||
}
|
||||
|
||||
if (!field.has("Kids") && /\[\d+\]$/.test(name)) {
|
||||
if (!field.has("Kids") && field.has("T") && /\[\d+\]$/.test(name)) {
|
||||
// We've a terminal node: strip the index.
|
||||
name = name.substring(0, name.lastIndexOf("["));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue