]> granicus.if.org Git - transmission/commitdiff
remove unnecessary field test
authorJordan Lee <jordan@transmissionbt.com>
Fri, 26 Aug 2011 21:51:14 +0000 (21:51 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Fri, 26 Aug 2011 21:51:14 +0000 (21:51 +0000)
web/javascript/torrent.js

index e1c782979bc79cbaf506033351580e70e49d6de4..a816aa9c75f0b23ebe0fc29836e9d01c9f7d7780 100644 (file)
@@ -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]);