mirror of
https://github.com/transmission/transmission
synced 2024-12-23 00:04:06 +00:00
(web) #3296: Deleting a torrent hidden in the webui corrupts the row model
This commit is contained in:
parent
7f8db1f3c2
commit
59821c65c7
1 changed files with 3 additions and 0 deletions
|
@ -1566,6 +1566,9 @@ Transmission.prototype =
|
|||
var e = torrent.element();
|
||||
if( e ) {
|
||||
var row_index = tr.getTorrentIndex(tr._rows, torrent);
|
||||
//if torrent is not currently visible then delete a hidden row
|
||||
//otherwise the row model gets corrupted because no row gets deleted
|
||||
if( row_index == null ) row_index = tr._rows.length - 1;
|
||||
delete e._torrent; //remove circular refernce to help IE garbage collect
|
||||
tr._rows.splice(row_index, 1)
|
||||
e.remove();
|
||||
|
|
Loading…
Reference in a new issue