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:
Quinton Lee
2016-07-24 14:49:27 -05:00
committed by GitHub
parent ae10b46a04
commit d5beedd401

View File

@@ -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>';