don't return empty wrtc object in browser

This commit is contained in:
Feross Aboukhadijeh 2015-04-23 21:15:40 -07:00
parent 19d10c7804
commit e0afafc776
2 changed files with 3 additions and 4 deletions

View File

@ -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')

View File

@ -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"