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:
Tim van der Meij 2026-04-12 16:29:28 +02:00 committed by GitHub
commit 0d61268875
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -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 = [];

View File

@ -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) {