fix(engine): capture tolerates a page that returns no list of late background images

This commit is contained in:
Miguel Ángel
2026-11-01 22:33:43 -05:00
parent 09ec50f330
commit 28d6abb4d4
+2 -1
View File
@@ -3317,7 +3317,8 @@ async function prepareFrameForCapture(
const hasPendingComposite = await seekPageTimeline(page, quantizedTime, seekOptions);
session.captureStep = "decoding CSS background images";
for (const url of await decodeDynamicCssBackgroundImages(page)) {
// Mocked pages answer evaluate() with undefined, so tolerate a missing list.
for (const url of (await decodeDynamicCssBackgroundImages(page)) ?? []) {
appendBrowserDiagnostic(
session,
`[FrameCapture] background image still decoding after ${BACKGROUND_DECODE_TIMEOUT_MS}ms, captured without it: ${url}`,