Skip to content

Commit 84f8bd5

Browse files
twliteamrbashir
andauthored
fix(http): properly invoke abort (#1662)
Co-authored-by: amrbashir <[email protected]>
1 parent af943db commit 84f8bd5

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changes/fix-http-plugin-abort.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"http-js": patch
3+
---
4+
5+
Fixed an issue with abort signal not aborting the fetch request.

plugins/http/api-iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/http/guest-js/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export async function fetch(
186186
throw new Error(ERROR_REQUEST_CANCELLED);
187187
}
188188

189-
signal?.addEventListener("abort", () => abort);
189+
signal?.addEventListener("abort", () => void abort());
190190

191191
interface FetchSendResponse {
192192
status: number;

0 commit comments

Comments
 (0)