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

Commit 3be4cef

Browse files
committed
fix: Browser not adding additional transports
1 parent ec7a589 commit 3be4cef

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/core/runtime/libp2p-browser.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ class Node extends libp2p {
2525
const r = new Railing(options.bootstrap)
2626
modules.discovery.push(r)
2727
}
28+
29+
if (options.modules && options.modules.transport) {
30+
options.modules.transport.forEach((t) => modules.transport.push(t))
31+
}
32+
33+
if (options.modules && options.modules.discovery) {
34+
options.modules.discovery.forEach((d) => modules.discovery.push(d))
35+
}
2836

2937
super(modules, peerInfo, peerBook, options)
3038
}

0 commit comments

Comments
 (0)