mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-27 01:17:22 +02:00
Ensure that the /P-entry is actually a dictionary in StructTreePage.prototype.addNode
This may fix issue 19822, but without a test-case it's simply impossible to know for sure.
This commit is contained in:
parent
76f23ce3b5
commit
bf553f22da
@ -757,7 +757,10 @@ class StructTreePage {
|
|||||||
|
|
||||||
const parent = dict.get("P");
|
const parent = dict.get("P");
|
||||||
|
|
||||||
if (!parent || isName(parent.get("Type"), "StructTreeRoot")) {
|
if (
|
||||||
|
!(parent instanceof Dict) ||
|
||||||
|
isName(parent.get("Type"), "StructTreeRoot")
|
||||||
|
) {
|
||||||
if (!this.addTopLevelNode(dict, element)) {
|
if (!this.addTopLevelNode(dict, element)) {
|
||||||
map.delete(dict);
|
map.delete(dict);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user