fix(download): cancel controls on torrent element

This commit is contained in:
Alexey Kasyanchuk
2018-02-09 10:07:25 +03:00
parent 00d03ed81e
commit ef705211ab
3 changed files with 26 additions and 7 deletions

View File

@ -621,14 +621,16 @@ setInterval(() => {
const id = torrentClientHashMap[hash]
if(!id)
{
callback(false)
if(callback)
callback(false)
return
}
torrentClient.remove(id, (err) => {
if(err)
{
callback(false)
if(callback)
callback(false)
return
}