mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-20 08:02:12 +00:00
fix: oopsie
This commit is contained in:
parent
d768b613a3
commit
581997444e
2 changed files with 3 additions and 3 deletions
|
|
@ -82,7 +82,7 @@
|
|||
<div class='font-size-20 font-weight-bold pl-5 pb-10'>
|
||||
{Object.values($peers).length} Member(s)
|
||||
</div>
|
||||
{#each Object.values($peers) as user}
|
||||
{#each Object.values($peers) as { user }}
|
||||
<User {user} />
|
||||
{/each}
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -217,8 +217,7 @@ export class W2GClient extends EventEmitter {
|
|||
/** @param {import('./events.js').default} event */
|
||||
#sendToPeers (event) {
|
||||
if (!this.#p2pt) return
|
||||
|
||||
for (const { peer } of Object.values(this.peers)) {
|
||||
for (const { peer } of Object.values(this.peers.value)) {
|
||||
if (peer) this.#sendEvent(peer, event)
|
||||
}
|
||||
}
|
||||
|
|
@ -226,6 +225,7 @@ export class W2GClient extends EventEmitter {
|
|||
destroy () {
|
||||
debug('destroy')
|
||||
this.#p2pt.destroy()
|
||||
this.removeAllListeners()
|
||||
this.#p2pt = null
|
||||
this.isHost = false
|
||||
this.peers.value = {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue