Author: ygrego Date: 2015-02-10 10:58:18 +0000 (Tue, 10 Feb 2015) New Revision: 784 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/784 Log: Loop modifying into method 'getChannel'. Modified: oipf/js/impl/model/ChannelList.js Modified: oipf/js/impl/model/ChannelList.js =================================================================== --- oipf/js/impl/model/ChannelList.js 2015-02-10 10:46:56 UTC (rev 783) +++ oipf/js/impl/model/ChannelList.js 2015-02-10 10:58:18 UTC (rev 784) @@ -25,9 +25,9 @@ * Return: Channel */ getChannel: function(channelID) { - for(var key = Object.keys(this)){ - var channel = this.[key] - if( channel && (channel.channelID == channelID)){ + for (var i = 0; i < this.length; i++) { + var channel = this.[i]; + if (channel && (channel.channelID == channelID)) { return channel; } }