Skip to content

Commit a9596f2

Browse files
authored
Merge pull request #3 from deco-cx/feat/send-close-signal-to-out
fix: send out signal
2 parents 0efc95e + c795751 commit a9596f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

channel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ export interface Channel<T> {
1212
export const link = (...signals: AbortSignal[]): AbortSignal => {
1313
const ctrl = new AbortController();
1414
for (const signal of signals) {
15-
signal.onabort = (evt) => {
15+
signal.addEventListener("abort", (evt) => {
1616
if (!ctrl.signal.aborted) {
1717
ctrl.abort(evt);
1818
}
19-
};
19+
});
2020
}
2121
return ctrl.signal;
2222
};

0 commit comments

Comments
 (0)