Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
🐛 Fix: unable to cancel fetch request with AbortSignal acacode#329.
Browse files Browse the repository at this point in the history
  • Loading branch information
grandsilence committed May 16, 2022
1 parent 7440945 commit bb59ada
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/base/http-clients/fetch-http-client.eta
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export class HttpClient<SecurityDataType = unknown> {
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
...(requestParams.headers || {}),
},
signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
}
).then(async (response) => {
Expand Down

0 comments on commit bb59ada

Please sign in to comment.