diff --git a/web/javascript/transmission.remote.js b/web/javascript/transmission.remote.js index 9bb84df50..803e7b50b 100644 --- a/web/javascript/transmission.remote.js +++ b/web/javascript/transmission.remote.js @@ -152,17 +152,20 @@ TransmissionRemote.prototype = }, removeTorrentsAndData: function( torrents ) { var remote = this, - o = { }; - o.method = 'torrent-remove'; - o.arguments = { }; - o.arguments['delete-local-data'] = true; - o.arguments.ids = [ ]; + var o = { + method: 'torrent-remove', + arguments: { + 'delete-local-data': true, + ids: [ ] + } + }; + if( torrents != null ) for( var i=0, len=torrents.length; i