Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Commit

Permalink
fix: options
Browse files Browse the repository at this point in the history
  • Loading branch information
dryajov authored and jacobheun committed Aug 10, 2018
1 parent 546af97 commit 22e8518
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"async": "^2.6.0",
"debug": "^3.1.0",
"interface-connection": "^0.3.2",
"lodash": "^4.17.5",
"mafmt": "^6.0.0",
"multiaddr": "^5.0.0",
"multistream-select": "^0.14.1",
Expand Down
10 changes: 1 addition & 9 deletions src/circuit/hop.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const EE = require('events').EventEmitter
const once = require('once')
const utilsFactory = require('./utils')
const StreamHandler = require('./stream-handler')
const assignInWith = require('lodash/assignInWith')
const proto = require('../protocol')
const multiaddr = require('multiaddr')

Expand All @@ -36,14 +35,7 @@ class Hop extends EE {
this.swarm = swarm
this.peerInfo = this.swarm._peerInfo
this.utils = utilsFactory(swarm)
this.config = assignInWith(
{
active: false,
enabled: false
},
options,
(orig, src) => typeof src === 'undefined' ? false : src)

this.config = options || {active: false, enabled: false}
this.active = this.config.active
}

Expand Down

0 comments on commit 22e8518

Please sign in to comment.