chore: remove redundant checks from network interception (#28922)

We only intercept requests in Playwright so these fields are always
undefined.
This commit is contained in:
Yury Semikhatsky 2024-01-09 13:35:51 -08:00 committed by GitHub
parent 2ddf3a45f9
commit 19a4f15eb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -305,7 +305,7 @@ export class CRNetworkManager {
}); });
this._requestIdToRequest.set(requestWillBeSentEvent.requestId, request); this._requestIdToRequest.set(requestWillBeSentEvent.requestId, request);
if (requestPausedEvent && !requestPausedEvent.responseStatusCode && !requestPausedEvent.responseErrorReason) { if (requestPausedEvent) {
// We will not receive extra info when intercepting the request. // We will not receive extra info when intercepting the request.
// Use the headers from the Fetch.requestPausedPayload and release the allHeaders() // Use the headers from the Fetch.requestPausedPayload and release the allHeaders()
// right away, so that client can call it from the route handler. // right away, so that client can call it from the route handler.