diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2014-11-29 10:58:31 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2014-11-29 10:58:31 +0300 |
commit | 6abf6bc9a50d6c5b0d34b95a83df3a8dbc4bcc4c (patch) | |
tree | 8298eae3658615a6556e8aac401483325c04a055 /lib/torrent.js | |
parent | ac43874204fde89f2c8a3f50e634838b24ac271b (diff) |
allow Torrent to be initialized from another Torrent instance
Diffstat (limited to 'lib/torrent.js')
-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 7834a80..3181c63 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -73,7 +73,7 @@ function Torrent (torrentId, opts) { self._critical = [] self._storageImpl = opts.storage || Storage - var parsedTorrent = parseTorrent(torrentId) + var parsedTorrent = (torrentId && torrentId.parsedTorrent) || parseTorrent(torrentId) if (parsedTorrent && parsedTorrent.infoHash) { onTorrentId(parsedTorrent) |