Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.js b/index.js
index 667e16c..dfaed8d 100644
--- a/index.js
+++ b/index.js
@@ -101,9 +101,10 @@ function WebTorrent (opts) {
if (opts.wrtc) {
// TODO: remove in v1
console.warn('WebTorrent: opts.wrtc is deprecated. Use opts.tracker.wrtc instead')
- self.tracker.wrtc = opts.wrtc // to support `webtorrent-hybrid` package
+ self.tracker.wrtc = opts.wrtc
}
if (global.WRTC && !self.tracker.wrtc) self.tracker.wrtc = global.WRTC
+ if (typeof self.tracker.wrtc === 'function') self.tracker.wrtc = self.tracker.wrtc() // Initialize
}
if (typeof TCPPool === 'function') {