Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: Browser not adding additional transports
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Oct 14, 2017
1 parent ec7a589 commit 3be4cef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/runtime/libp2p-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ class Node extends libp2p {
const r = new Railing(options.bootstrap)
modules.discovery.push(r)
}

if (options.modules && options.modules.transport) {
options.modules.transport.forEach((t) => modules.transport.push(t))
}

if (options.modules && options.modules.discovery) {
options.modules.discovery.forEach((d) => modules.discovery.push(d))
}

super(modules, peerInfo, peerBook, options)
}
Expand Down

0 comments on commit 3be4cef

Please sign in to comment.