Skip to content

Commit

Permalink
fix: do double equals to cover undefined values (libp2p#1872)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Potsides <[email protected]>
  • Loading branch information
maschad and achingbrain authored Jul 29, 2023
1 parent 13b653e commit 21f7719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/libp2p/src/libp2p.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class Libp2pNode<T extends ServiceMap = Record<string, unknown>> extends

components.events.addEventListener('peer:update', evt => {
// if there was no peer previously in the peer store this is a new peer
if (evt.detail.previous === null) {
if (evt.detail.previous == null) {
const peerInfo: PeerInfo = {
id: evt.detail.peer.id,
multiaddrs: evt.detail.peer.addresses.map(a => a.multiaddr),
Expand Down

0 comments on commit 21f7719

Please sign in to comment.