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
path: root/lib
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-12-17 13:24:13 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-12-17 14:39:56 +0300
commit914ddd546fff3b6ced22e685a4db8ea407aa4d23 (patch)
tree13f4c6b9a7c2fb7e6c103d50d7ac33842bcdcac3 /lib
parente31197d5cd9cd1b923cd56bc59d45a51b671ae1c (diff)
torrent.createServer: throw error in browser
Diffstat (limited to 'lib')
-rw-r--r--lib/torrent.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index a54bd1d..00415f3 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -1185,7 +1185,7 @@ Torrent.prototype.load = function (streams, cb) {
Torrent.prototype.createServer = function (opts) {
var self = this
- if (typeof Server !== 'function') return // browser exclude
+ if (typeof Server !== 'function') throw new Error('node.js-only method')
var server = new Server(self, opts)
self._servers.push(server)
return server