Skip to content

Commit

Permalink
fix: use symbol instead of constructor name (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobheun authored Dec 4, 2018
1 parent ae51388 commit 53ed3bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ class Node extends EventEmitter {
}

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)) {
// TODO find a cleaner way to signal that a transport is always used
// for dialing, even if no listener
Expand Down

0 comments on commit 53ed3bd

Please sign in to comment.