Skip to content

Commit

Permalink
Remove moot .destroy() in afterResponse hook logic
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed Apr 29, 2020
1 parent 7d7bf4e commit adf5b8a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions source/as-promise/index.ts
Expand Up @@ -105,8 +105,6 @@ export default function asPromise<T>(options: NormalizedOptions): CancelableRequ
// @ts-ignore TS doesn't notice that CancelableRequest is a Promise
// eslint-disable-next-line no-await-in-loop
response = await hook(response, async (updatedOptions): CancelableRequest<Response> => {
request.destroy();

const typedOptions = PromisableRequest.normalizeArguments(undefined, {
...updatedOptions,
retry: {
Expand Down

0 comments on commit adf5b8a

Please sign in to comment.