Skip to content

Commit

Permalink
fix: pass abort reason to early abort
Browse files Browse the repository at this point in the history
  • Loading branch information
kadhirr committed Dec 16, 2024
1 parent 15e6437 commit b05f3ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/core/Ky.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class Ky {
this.abortController = new globalThis.AbortController();
const originalSignal = this._options.signal ?? (this._input as Request).signal;
if (originalSignal?.aborted) {
this.abortController.abort();
this.abortController.abort(originalSignal?.reason);
}

originalSignal?.addEventListener('abort', () => {
Expand Down

0 comments on commit b05f3ad

Please sign in to comment.