From: Mitchell Livingston Date: Wed, 24 Aug 2011 00:05:50 +0000 (+0000) Subject: fix "Error: remove is not defined" X-Git-Tag: 2.40b1~191 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6add1bc28b399ca504deefcd3606a3f8c5f09eda;p=transmission fix "Error: remove is not defined" --- diff --git a/web/javascript/transmission.js b/web/javascript/transmission.js index 281d07b13..512769ecc 100644 --- a/web/javascript/transmission.js +++ b/web/javascript/transmission.js @@ -1873,6 +1873,7 @@ Transmission.prototype = var keep = [ ] var elements = [ ] + var removedAny = false for(var i=0, row; row=this._rows[i]; ++i) { var tor = row.getTorrent() @@ -1880,6 +1881,7 @@ Transmission.prototype = if( torrent_ids.indexOf( tid ) == -1 ) keep.push( row ) else { + removedAny = true delete this._torrents[ tid ] $(row.getElement()).remove() } @@ -1887,7 +1889,7 @@ Transmission.prototype = this._rows = keep - return remove.length > 0 + return removedAny }, refreshDisplay: function( )