fix: undefined reference to response.body when aborted (#1578)
This commit is contained in:
parent
a92b5d5cf4
commit
1c5ed6b981
|
@ -110,7 +110,9 @@ export default async function fetch(url, options_) {
|
||||||
});
|
});
|
||||||
|
|
||||||
fixResponseChunkedTransferBadEnding(request_, error => {
|
fixResponseChunkedTransferBadEnding(request_, error => {
|
||||||
response.body.destroy(error);
|
if (response && response.body) {
|
||||||
|
response.body.destroy(error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/* c8 ignore next 18 */
|
/* c8 ignore next 18 */
|
||||||
|
|
Loading…
Reference in New Issue