Verified Commit 17e2705f authored by Chocobozzz's avatar Chocobozzz
Browse files

Fix tests

parent 842a1573
......@@ -10,8 +10,8 @@ let webtorrent: WebTorrent.Instance
function webtorrentAdd (torrentId: string, refreshWebTorrent = false) {
const WebTorrent = require('webtorrent')
if (!webtorrent) webtorrent = new WebTorrent()
if (refreshWebTorrent === true) webtorrent = new WebTorrent()
if (webtorrent && refreshWebTorrent) webtorrent.destroy()
if (!webtorrent || refreshWebTorrent) webtorrent = new WebTorrent()
webtorrent.on('error', err => console.error('Error in webtorrent', err))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment