diff options
Diffstat (limited to 'ext/broadcast_channel/01_broadcast_channel.js')
-rw-r--r-- | ext/broadcast_channel/01_broadcast_channel.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/broadcast_channel/01_broadcast_channel.js b/ext/broadcast_channel/01_broadcast_channel.js index 11b65b9b5..cf3b17ac5 100644 --- a/ext/broadcast_channel/01_broadcast_channel.js +++ b/ext/broadcast_channel/01_broadcast_channel.js @@ -16,7 +16,6 @@ ArrayPrototypeIndexOf, ArrayPrototypeSplice, ArrayPrototypePush, - SafeArrayIterator, Symbol, Uint8Array, } = window.__bootstrap.primordials; @@ -44,7 +43,9 @@ } function dispatch(source, name, data) { - for (const channel of new SafeArrayIterator(channels)) { + for (let i = 0; i < channels.length; ++i) { + const channel = channels[i]; + if (channel === source) continue; // Don't self-send. if (channel[_name] !== name) continue; if (channel[_closed]) continue; |