mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-28 08:21:33 +00:00
Do not allow undefined peerInfo
# What The code assumes that `peerInfo` exists, the API doesn't. # How to test ```js swarm = new Swarm() swarm.addTransport('tcp', tcp, { multiaddr: mh }, {}, {port: 8095}) ``` This shouldn't explode because of `self.peerInfo.multiaddrs`.
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
var Swarm = require('./swarm')
|
||||
|
||||
exports = module.exports = Swarm
|
||||
exports.singleton = new Swarm()
|
||||
|
Reference in New Issue
Block a user