diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-12-17 13:24:13 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-12-17 14:39:56 +0300 |
commit | 914ddd546fff3b6ced22e685a4db8ea407aa4d23 (patch) | |
tree | 13f4c6b9a7c2fb7e6c103d50d7ac33842bcdcac3 /lib | |
parent | e31197d5cd9cd1b923cd56bc59d45a51b671ae1c (diff) |
torrent.createServer: throw error in browser
Diffstat (limited to 'lib')
-rw-r--r-- | lib/torrent.js | 2 |
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 |