Fix infinite loop by using a new counter variable

This commit is contained in:
Nathan Gray 2013-11-21 21:25:31 +00:00
parent 6985c3d61f
commit 0853f5bd66

View File

@ -494,11 +494,11 @@ var et2_nextmatch_rowProvider = Class.extend(
// TODO // TODO
var cat = this.categories[cat_id] || null; var cat = this.categories[cat_id] || null;
for(var i = 0; cat == null && this.categories && i < this.categories.length; i++) for(var j = 0; cat == null && this.categories && j < this.categories.length; j++)
{ {
if(this.categories[i] && this.categories[i].value && this.categories[i].value == cat_id) if(this.categories[j] && this.categories[j].value && this.categories[j].value == cat_id)
{ {
cat = this.categories[i]; cat = this.categories[j];
} }
} }
// Create class // Create class