mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #2968 from yurydelendik/nametree
Misc NameTree/JavaScript fixes
This commit is contained in:
commit
671521c120
1 changed files with 4 additions and 1 deletions
|
@ -332,7 +332,7 @@ var Catalog = (function CatalogClosure() {
|
|||
if (isStream(js)) {
|
||||
js = bytesToString(js.getBytes());
|
||||
}
|
||||
javaScript.push(js);
|
||||
javaScript.push(stringToPDFString(js));
|
||||
}
|
||||
}
|
||||
return shadow(this, 'javaScript', javaScript);
|
||||
|
@ -797,6 +797,9 @@ var NameTree = (function NameTreeClosure() {
|
|||
while (queue.length > 0) {
|
||||
var i, n;
|
||||
var obj = xref.fetchIfRef(queue.shift());
|
||||
if (!isDict(obj)) {
|
||||
continue;
|
||||
}
|
||||
if (obj.has('Kids')) {
|
||||
var kids = obj.get('Kids');
|
||||
for (i = 0, n = kids.length; i < n; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue