mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2024-12-13 19:06:27 +00:00
don't return empty wrtc object in browser
This commit is contained in:
parent
19d10c7804
commit
e0afafc776
@ -11,12 +11,12 @@ var Socket = require('simple-websocket')
|
||||
|
||||
var wrtc
|
||||
try {
|
||||
wrtc = require('wrtc') // webrtc in node - will be empty object in browser
|
||||
wrtc = require('wrtc') // WebRTC in node/browser
|
||||
} catch (err) {
|
||||
wrtc = null // optional dependency failed to install
|
||||
}
|
||||
|
||||
var WEBRTC_SUPPORT = typeof window !== 'undefined' || !!wrtc
|
||||
var WEBRTC_SUPPORT = !!wrtc
|
||||
|
||||
var common = require('./common')
|
||||
|
||||
|
@ -14,8 +14,7 @@
|
||||
"./lib/common-node": false,
|
||||
"./lib/http-tracker": false,
|
||||
"./lib/udp-tracker": false,
|
||||
"./server": false,
|
||||
"wrtc": false
|
||||
"./server": false
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/feross/bittorrent-tracker/issues"
|
||||
|
Loading…
Reference in New Issue
Block a user