Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/web/fetch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
Expand Down