From 98ff139471ecccae35158168ac4faaaec1642ab5 Mon Sep 17 00:00:00 2001 From: nilshah98 Date: Fri, 24 Nov 2023 22:12:37 +0530 Subject: [PATCH] fix: coverage issue with single if blocks --- packages/core/src/network.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/core/src/network.js b/packages/core/src/network.js index 99820e405..c95713b54 100644 --- a/packages/core/src/network.js +++ b/packages/core/src/network.js @@ -172,10 +172,9 @@ export class Network { this.#pending.delete(requestId); // guard against redirects with the same requestId - if (pending?.request.url === event.request.url && - pending.request.method === event.request.method) { - await this._handleRequest(session, { ...pending, resourceType, interceptId }); - } + pending?.request.url === event.request.url && + pending.request.method === event.request.method && + await this._handleRequest(session, { ...pending, resourceType, interceptId }); } // Called when a request will be sent. If the request has already been intercepted, handle it;