From 073ae7f9fd399e3993493a08977938d9882f0c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Thu, 21 Sep 2017 17:00:05 +0200 Subject: [PATCH] fix: Browser not adding additional transports --- src/core/runtime/libp2p-browser.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/runtime/libp2p-browser.js b/src/core/runtime/libp2p-browser.js index 8968fc8b62..150e27a2be 100644 --- a/src/core/runtime/libp2p-browser.js +++ b/src/core/runtime/libp2p-browser.js @@ -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) }