chore: fix uncaught error (#10234)

This commit is contained in:
Alex Rudenko 2023-05-23 15:19:12 +02:00 committed by GitHub
parent 4edcb72430
commit 8903d2f6ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ?? '';
}
}