mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-07 19:38:02 -05:00
Don't crash teambuilder on corrupted team
This commit is contained in:
@@ -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+'] ';
|
||||
|
||||
Reference in New Issue
Block a user