File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ class Node extends EventEmitter {
3434 this . peerInfo = _options . peerInfo
3535 this . peerBook = _options . peerBook || new PeerBook ( )
3636
37- this . _modules = _options . modules
38- this . _config = _options . config
37+ this . _modules = _options . modules || { }
38+ this . _config = _options . config || { }
3939 this . _isStarted = false
4040 this . _transport = [ ] // Transport instances/references
4141 this . _discovery = [ ] // Discovery service instances/references
@@ -76,7 +76,7 @@ class Node extends EventEmitter {
7676 }
7777
7878 // dht provided components (peerRouting, contentRouting, dht)
79- if ( this . _config . EXPERIMENTAL . dht ) {
79+ if ( this . _config . EXPERIMENTAL && this . _config . EXPERIMENTAL . dht ) {
8080 const DHT = this . _modules . dht
8181 this . _dht = new DHT ( this . _switch , {
8282 kBucketSize : this . _config . dht . kBucketSize || 20 ,
You can’t perform that action at this time.
0 commit comments