File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22** /* .log
33test /repo-tests *
44** /bundle.js
5+ docs
56
67# Logs
78logs
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const Room = require('ipfs-pubsub-room')
3636const IPFS = require (' ipfs' )
3737
3838const ipfs = await IPFS .create ({ ... })
39- const room = Room (ipfs . libp2p , ' room-name' )
39+ const room = Room (ipfs, ' room-name' )
4040```
4141
4242Once we have a room we can listen for messages
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ let index = 0
1818class PubSubRoom extends EventEmitter {
1919 constructor ( libp2p , topic , options ) {
2020 super ( )
21- this . _libp2p = libp2p
21+ this . _libp2p = libp2p . libp2p || libp2p
2222 this . _topic = topic
2323 this . _options = Object . assign ( { } , clone ( DEFAULT_OPTIONS ) , clone ( options ) )
2424 this . _peers = [ ]
You can’t perform that action at this time.
0 commit comments