Fix Delete Torrent + Data for newly added magnet links

Before, if you added a magnet link and then tried to delete the torrent plus data before the file list was loaded, it would fail and throw an uncaught error

Fixes #803
This commit is contained in:
DC
2016-08-22 00:43:06 -07:00
parent 24ac5af5b4
commit e872282221
2 changed files with 2 additions and 1 deletions

View File

@@ -263,7 +263,7 @@ function deleteFile (path) {
// Delete all files in a torrent
function moveItemToTrash (torrentSummary) {
var filePath = TorrentSummary.getFileOrFolder(torrentSummary)
ipcRenderer.send('moveItemToTrash', filePath)
if (filePath) ipcRenderer.send('moveItemToTrash', filePath)
}
function showItemInFolder (torrentSummary) {