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:
authorFeross Aboukhadijeh <feross@feross.org>2014-09-17 07:29:43 +0400
committerFeross Aboukhadijeh <feross@feross.org>2014-09-17 07:29:43 +0400
commit1d93189d7cae98e8233f445ad58fe51543851f68 (patch)
tree56068e29e5ed567e552ec6fd451f366b00d23ddb /index.js
parent613eb35685e031dca3e2e4f9363a6fcbba2caa4f (diff)
simplify client.add code
Diffstat (limited to 'index.js')
-rw-r--r--index.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/index.js b/index.js
index b5cab42..c919fc4 100644
--- a/index.js
+++ b/index.js
@@ -65,13 +65,7 @@ WebTorrent.prototype.download = function (torrentId, opts, ontorrent) {
// TODO: fix this to work with multiple torrents
self.index = opts.index
- var torrent = Client.prototype.add.call(self, torrentId, opts, ontorrent)
-
- process.nextTick(function () {
- self.emit('add', torrent)
- })
-
- return self
+ return Client.prototype.add.call(self, torrentId, opts, ontorrent)
}
/**