Skip to content

Commit

Permalink
fix: don't null controller
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Dec 8, 2021
1 parent 8c74473 commit 2758d9c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/fetch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1350,15 +1350,12 @@ function httpNetworkFetch (
}

// TODO (fix): Do we need controller here?
if (context.controller) {
try {
context.controller.error(err)
context.controller = null
} catch (err) {
// Will throw TypeError if body is not readable.
if (err.name !== 'TypeError') {
throw err
}
try {
context.controller?.error(err)
} catch (err) {
// Will throw TypeError if body is not readable.
if (err.name !== 'TypeError') {
throw err
}
}
}
Expand Down

0 comments on commit 2758d9c

Please sign in to comment.