mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
refactor: broker class instance with consistent parameters
This commit is contained in:
parent
480ce576c8
commit
bbae301524
@ -40,11 +40,9 @@ class OrbitDB {
|
||||
this._ipfs = ipfs
|
||||
this.identity = identity
|
||||
this.id = options.peerId
|
||||
this._pubsub = !options.offline
|
||||
? options.broker
|
||||
? new options.broker(this._ipfs) // eslint-disable-line
|
||||
: new Pubsub(this._ipfs, this.id)
|
||||
: null
|
||||
this._pubsub = !options.offline ?
|
||||
new (options.broker ? options.broker : Pubsub)(this._ipfs, this.id)
|
||||
: null
|
||||
this.directory = options.directory || './orbitdb'
|
||||
this.storage = options.storage
|
||||
this._directConnections = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user