We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d402e2a commit b74da91Copy full SHA for b74da91
lib/internal/abort_controller.js
@@ -197,9 +197,10 @@ class AbortSignal extends EventTarget {
197
static any(signals) {
198
validateAbortSignalArray(signals, 'signals');
199
const resultSignal = createAbortSignal({ composite: true });
200
- const resultSignalWeakRef = new WeakRef(resultSignal);
+ let resultSignalWeakRef;
201
resultSignal[kSourceSignals] = new SafeSet();
202
for (let i = 0; i < signals.length; i++) {
203
+ resultSignalWeakRef ??= new WeakRef(resultSignal);
204
const signal = signals[i];
205
if (signal.aborted) {
206
abortSignal(resultSignal, signal.reason);
0 commit comments