Skip to content

Commit

Permalink
fix: linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kadhirr committed Dec 15, 2024
1 parent 160758e commit 15e6437
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion source/core/Ky.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ export class Ky {
if (originalSignal?.aborted) {
this.abortController.abort();
}

originalSignal?.addEventListener('abort', () => {
this.abortController!.abort(originalSignal.reason);
});

this._options.signal = this.abortController.signal;
}

Expand Down
1 change: 0 additions & 1 deletion test/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,6 @@ test('throws AbortError when signal was aborted before request', async t => {

const error = (await t.throwsAsync(response))!;


t.true(['DOMException', 'Error'].includes(error.constructor.name), `Expected DOMException or Error, got ${error.constructor.name}`);
t.is(error.name, 'AbortError', `Expected AbortError, got ${error.name}`);
});
Expand Down

0 comments on commit 15e6437

Please sign in to comment.