Don't crash teambuilder on corrupted team

This commit is contained in:
Guangcong Luo
2013-05-21 16:39:46 -05:00
parent 5dff78bbdb
commit 8d23f4d5c5

View File

@@ -136,6 +136,14 @@
var team = teams[i];
if (!team) {
buf += '<li>Error: corrupted team</li>';
teams.splice(i,1);
i--;
if (this.deletedTeamLoc && this.deletedTeamLoc > i) this.deletedTeamLoc--;
continue;
}
var formatText = '';
if (team.format) {
formatText = '['+team.format+'] ';