Skip to content

Commit

Permalink
fix: unbound event listener (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain committed Nov 15, 2022
1 parent 42655dd commit 087a66a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ export class GossipSub extends EventEmitter<GossipsubEvents> implements PubSub<G
this.acceptFromWhitelist.delete(id)
}

private onPeerAddressChange(evt: CustomEvent<PeerMultiaddrsChangeData>): void {
private onPeerAddressChange = (evt: CustomEvent<PeerMultiaddrsChangeData>): void => {
const { peerId, multiaddrs, oldMultiaddrs } = evt.detail
const newIps = new Set<string>()
const oldIps = new Set<string>()
Expand Down

0 comments on commit 087a66a

Please sign in to comment.