diff --git a/lib/web/fetch/index.js b/lib/web/fetch/index.js index e9733362e95..e7115b2e7e6 100644 --- a/lib/web/fetch/index.js +++ b/lib/web/fetch/index.js @@ -204,7 +204,7 @@ function fetch (input, init = undefined) { const processResponse = (response) => { // 1. If locallyAborted is true, terminate these substeps. if (locallyAborted) { - return Promise.resolve() + return } // 2. If response’s aborted flag is set, then: @@ -217,14 +217,14 @@ function fetch (input, init = undefined) { // deserializedError. abortFetch(p, request, responseObject, controller.serializedAbortReason) - return Promise.resolve() + return } // 3. If response is a network error, then reject p with a TypeError // and terminate these substeps. if (response.type === 'error') { p.reject(new TypeError('fetch failed', { cause: response.error })) - return Promise.resolve() + return } // 4. Set responseObject to the result of creating a Response object,