mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: handle extraInfo events even if event.hasExtraInfo === false (#7808)
Issues: #7805
This commit is contained in:
parent
921c3bcfcf
commit
6ee2feb1ea
@ -513,7 +513,7 @@ export class NetworkManager extends EventEmitter {
|
|||||||
|
|
||||||
_emitResponseEvent(
|
_emitResponseEvent(
|
||||||
responseReceived: Protocol.Network.ResponseReceivedEvent,
|
responseReceived: Protocol.Network.ResponseReceivedEvent,
|
||||||
extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent
|
extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent | null
|
||||||
): void {
|
): void {
|
||||||
const request = this._requestIdToRequest.get(responseReceived.requestId);
|
const request = this._requestIdToRequest.get(responseReceived.requestId);
|
||||||
// FileUpload sends a response without a matching request.
|
// FileUpload sends a response without a matching request.
|
||||||
@ -523,8 +523,11 @@ export class NetworkManager extends EventEmitter {
|
|||||||
responseReceived.requestId
|
responseReceived.requestId
|
||||||
);
|
);
|
||||||
if (extraInfos.length) {
|
if (extraInfos.length) {
|
||||||
throw new Error(
|
debugError(
|
||||||
'Unexpected extraInfo events for request ' + responseReceived.requestId
|
new Error(
|
||||||
|
'Unexpected extraInfo events for request ' +
|
||||||
|
responseReceived.requestId
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user