Skip to content

Commit 7187e32

Browse files
committed
simplify abort function to arrow function
1 parent a521d69 commit 7187e32

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/execution/PromiseCanceller.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ export class PromiseCanceller {
3535
}
3636

3737
const { promise, resolve, reject } = promiseWithResolvers<T>();
38-
const abort = () => {
39-
reject(this.abortSignal.reason);
40-
};
38+
const abort = () => reject(this.abortSignal.reason);
4139
this._aborts.add(abort);
4240
originalPromise.then(
4341
(resolved) => {

0 commit comments

Comments
 (0)