Skip to content

Commit 7a67a2f

Browse files
committed
fixup!
1 parent 4bc65b2 commit 7a67a2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/streams/operators.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ async function some(fn, options) {
156156
// Note that some does short circuit but also closes the iterator if it does
157157
const ac = new AbortController();
158158
if (options?.signal) {
159-
options?.signal?.addEventListener('abort', ac.abort.bind(ac), {
159+
options?.signal?.addEventListener('abort', () => ac.abort(), {
160160
[kWeakHandler]: this,
161161
once: true,
162162
});
163163
}
164-
const mapped = this.map(fn, { ...(options ?? {}), signal: ac.signal });
164+
const mapped = this.map(fn, { ...options, signal: ac.signal });
165165
for await (const result of mapped) {
166166
if (result) {
167167
ac.abort();

0 commit comments

Comments
 (0)