diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2014-09-17 07:29:43 +0400 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2014-09-17 07:29:43 +0400 |
commit | 1d93189d7cae98e8233f445ad58fe51543851f68 (patch) | |
tree | 56068e29e5ed567e552ec6fd451f366b00d23ddb /index.js | |
parent | 613eb35685e031dca3e2e4f9363a6fcbba2caa4f (diff) |
simplify client.add code
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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) } /** |