Skip to content

Commit

Permalink
fix: handle extraInfo events even if event.hasExtraInfo === false (pu…
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN authored Nov 29, 2021
1 parent 921c3bc commit 6ee2feb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/common/NetworkManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ export class NetworkManager extends EventEmitter {

_emitResponseEvent(
responseReceived: Protocol.Network.ResponseReceivedEvent,
extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent
extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent | null
): void {
const request = this._requestIdToRequest.get(responseReceived.requestId);
// FileUpload sends a response without a matching request.
Expand All @@ -523,8 +523,11 @@ export class NetworkManager extends EventEmitter {
responseReceived.requestId
);
if (extraInfos.length) {
throw new Error(
'Unexpected extraInfo events for request ' + responseReceived.requestId
debugError(
new Error(
'Unexpected extraInfo events for request ' +
responseReceived.requestId
)
);
}

Expand Down

0 comments on commit 6ee2feb

Please sign in to comment.