Skip to content

Commit 53ed3bd

Browse files
authored
fix: use symbol instead of constructor name (#292)
1 parent ae51388 commit 53ed3bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class Node extends EventEmitter {
342342
}
343343

344344
if (t.filter(multiaddrs).length > 0) {
345-
this._switch.transport.add(t.tag || t.constructor.name, t)
345+
this._switch.transport.add(t.tag || t[Symbol.toStringTag], t)
346346
} else if (WebSockets.isWebSockets(t)) {
347347
// TODO find a cleaner way to signal that a transport is always used
348348
// for dialing, even if no listener

0 commit comments

Comments
 (0)