mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-10 04:49:14 -05:00
Fix team selector message
'Error: Corrupted team' was shown when defaulting to no team due to a change from 2211924c49
This commit is contained in:
@@ -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++) {
|
||||
@@ -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>';
|
||||
|
||||
Reference in New Issue
Block a user