diff --git a/index.js b/index.js index 135fb93c..1a9b6967 100644 --- a/index.js +++ b/index.js @@ -234,7 +234,7 @@ class WebTorrent extends EventEmitter { this._debug('add') opts = opts ? Object.assign({}, opts) : {} - const torrent = new Torrent(torrentId, this, opts) + const torrent = torrentId instanceof Torrent ? torrentId : new Torrent(torrentId, this, opts) this.torrents.push(torrent) torrent.once('_infoHash', onInfoHash)