diff --git a/packages/puppeteer-core/src/common/bidi/HTTPResponse.ts b/packages/puppeteer-core/src/common/bidi/HTTPResponse.ts index 727ae32cbeb..acca87d5fcc 100644 --- a/packages/puppeteer-core/src/common/bidi/HTTPResponse.ts +++ b/packages/puppeteer-core/src/common/bidi/HTTPResponse.ts @@ -56,7 +56,8 @@ export class HTTPResponse extends BaseHTTPResponse { // TODO: update once BiDi has types this.#timings = (response as any).timings ?? null; - for (const header of response.headers) { + // TODO: Removed once the Firefox implementation is compliant with https://w3c.github.io/webdriver-bidi/#get-the-response-data. + for (const header of response.headers || []) { this.#headers[header.name] = header.value ?? ''; } }