Skip to content

Commit

Permalink
Fix team selector message
Browse files Browse the repository at this point in the history
'Error: Corrupted team' was shown when defaulting to no team due to a change from smogon@2211924
  • Loading branch information
sirDonovan authored Jul 24, 2016
1 parent ae10b46 commit d5beedd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/client-mainmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -1051,9 +1051,6 @@
}
}, {
renderTeam: function (i) {
if (i === undefined) {
return '<em>Select a team</em>';
}
if (i === 'random') {
var buf = '<strong>Random team</strong><small>';
for (var i = 0; i < 6; i++) {
Expand All @@ -1062,6 +1059,9 @@
buf += '</small>';
return buf;
}
if (i < 0) {
return '<em>Select a team</em>';
}
var team = Storage.teams[i];
if (!team) return 'Error: Corrupted team';
var buf = '<strong>' + Tools.escapeHTML(team.name) + '</strong><small>';
Expand Down

0 comments on commit d5beedd

Please sign in to comment.