mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-04-28 03:52:15 +00:00
fix: use symbol instead of constructor name (#292)
This commit is contained in:
parent
ae513887f5
commit
53ed3bdb99
@ -342,7 +342,7 @@ class Node extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (t.filter(multiaddrs).length > 0) {
|
if (t.filter(multiaddrs).length > 0) {
|
||||||
this._switch.transport.add(t.tag || t.constructor.name, t)
|
this._switch.transport.add(t.tag || t[Symbol.toStringTag], t)
|
||||||
} else if (WebSockets.isWebSockets(t)) {
|
} else if (WebSockets.isWebSockets(t)) {
|
||||||
// TODO find a cleaner way to signal that a transport is always used
|
// TODO find a cleaner way to signal that a transport is always used
|
||||||
// for dialing, even if no listener
|
// for dialing, even if no listener
|
||||||
|
Loading…
x
Reference in New Issue
Block a user