]> granicus.if.org Git - transmission/commitdiff
fix "Error: remove is not defined"
authorMitchell Livingston <livings124@transmissionbt.com>
Wed, 24 Aug 2011 00:05:50 +0000 (00:05 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Wed, 24 Aug 2011 00:05:50 +0000 (00:05 +0000)
web/javascript/transmission.js

index 281d07b139483bdd91367dfcf4315d8813c96539..512769ecc7d9a71286e0d028bed2056f057ff634 100644 (file)
@@ -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( )