mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-22 16:05:56 +02:00
Merge pull request #21091 from calixteman/debbuger_array_content_stream
[Debugger] Fix the content stream rendering when it's a ref to an array
This commit is contained in:
commit
0d61268875
@ -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