mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-03-16 15:40:49 +00:00
fix: do not mutate the config object
License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
This commit is contained in:
parent
e320854db7
commit
ac5cacba33
@ -172,8 +172,7 @@ class Node extends EventEmitter {
|
||||
let d
|
||||
|
||||
if (typeof D === 'function') {
|
||||
config.peerInfo = this.peerInfo
|
||||
d = new D(config)
|
||||
d = new D(Object.assign({}, config, { peerInfo: this.peerInfo }))
|
||||
} else {
|
||||
d = D
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user