mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-18 11:14:02 +02:00
[Debugger] Fix the content stream rendering when it's a ref to an array
It can be verified in opening stepped.pdf (see #21089).
This commit is contained in:
parent
5089cceec7
commit
5cc5d9be45
@ -316,7 +316,10 @@ const InternalViewerUtils = {
|
||||
},
|
||||
|
||||
getContentTokens(contentsVal, xref) {
|
||||
const refs = Array.isArray(contentsVal) ? contentsVal : [contentsVal];
|
||||
// Contents may be a Ref to a stream, a direct array of Refs, or a Ref to
|
||||
// an array of Refs. Resolve one level to detect the array case.
|
||||
const resolvedVal = xref.fetchIfRef(contentsVal);
|
||||
const refs = Array.isArray(resolvedVal) ? resolvedVal : [contentsVal];
|
||||
const rawContents = [];
|
||||
const tokens = [];
|
||||
const rawBytesArr = [];
|
||||
|
||||
@ -196,7 +196,7 @@ class NetworkPdfManager extends BasePdfManager {
|
||||
try {
|
||||
const value = obj[prop];
|
||||
if (typeof value === "function") {
|
||||
return value.apply(obj, args);
|
||||
return await value.apply(obj, args);
|
||||
}
|
||||
return value;
|
||||
} catch (ex) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user