From: Jordan Lee Date: Fri, 26 Aug 2011 21:51:14 +0000 (+0000) Subject: remove unnecessary field test X-Git-Tag: 2.40b1~144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f8be90491c962e3720d64300ba3436f411503b0;p=transmission remove unnecessary field test --- diff --git a/web/javascript/torrent.js b/web/javascript/torrent.js index e1c782979..a816aa9c7 100644 --- a/web/javascript/torrent.js +++ b/web/javascript/torrent.js @@ -153,20 +153,12 @@ Torrent.prototype = return announces.join('\t'); }, - isField: function(name) { - return ( name === 'id' ) - || ( Torrent.Fields.Stats.indexOf(name) !== -1 ) - || ( Torrent.Fields.StatsExtra.indexOf(name) !== -1 ) - || ( Torrent.Fields.InfoExtra.indexOf(name) !== -1 ) - || ( Torrent.Fields.Metadata.indexOf(name) !== -1 ); - }, - refreshFields: function(data) { var changed = false; for (var key in data) { - if (this.isField(key)) switch (key) { + switch (key) { case 'files': case 'fileStats': // merge files and fileStats together changed |= this.updateFiles(data[key]);