diff --git a/lib/internal/abort_controller.js b/lib/internal/abort_controller.js index 779d2a7c39144a..e31738b98288ca 100644 --- a/lib/internal/abort_controller.js +++ b/lib/internal/abort_controller.js @@ -197,6 +197,9 @@ class AbortSignal extends EventTarget { static any(signals) { validateAbortSignalArray(signals, 'signals'); const resultSignal = createAbortSignal({ composite: true }); + if (!signals.length) { + return resultSignal; + } const resultSignalWeakRef = new WeakRef(resultSignal); resultSignal[kSourceSignals] = new SafeSet(); for (let i = 0; i < signals.length; i++) {