Skip to content

Commit

Permalink
full code/func coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Feb 22, 2023
1 parent b68b0f0 commit 350e4e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion broadcastchannel.js
Expand Up @@ -71,6 +71,7 @@ const getChannel = room =>
/**
* @param {{data:ArrayBuffer}} e
*/
/* c8 ignore next */
bc.onmessage = e => subs.forEach(sub => sub(e.data, 'broadcastchannel'))
return {
bc, subs
Expand Down Expand Up @@ -99,7 +100,6 @@ export const subscribe = (room, f) => {
export const unsubscribe = (room, f) => {
const channel = getChannel(room)
const unsubscribed = channel.subs.delete(f)
/* c8 ignore else */
if (unsubscribed && channel.subs.size === 0) {
channel.bc.close()
channels.delete(room)
Expand Down

0 comments on commit 350e4e8

Please sign in to comment.