mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-30 23:01:05 -05:00
Fix crash in team selection for tournaments (#921)
This commit is contained in:
committed by
Guangcong Luo
parent
65a4e1ba9a
commit
9fd0b58b37
@@ -989,6 +989,7 @@
|
||||
|
||||
this.team = data.team;
|
||||
this.format = data.format;
|
||||
this.room = data.room;
|
||||
|
||||
var format = BattleFormats[data.format];
|
||||
|
||||
@@ -1046,8 +1047,9 @@
|
||||
var sourceEl = this.sourceEl;
|
||||
var team = this.team;
|
||||
var format = this.format;
|
||||
var room = this.room;
|
||||
this.close();
|
||||
app.addPopup(TeamPopup, {team: team, format: format, sourceEl: sourceEl, moreTeams: true});
|
||||
app.addPopup(TeamPopup, {team: team, format: format, sourceEl: sourceEl, room: room, moreTeams: true});
|
||||
},
|
||||
teambuilder: function () {
|
||||
var teamFormat = this.teamFormat;
|
||||
@@ -1066,8 +1068,7 @@
|
||||
app.rooms[''].curTeamIndex = i;
|
||||
app.rooms[''].curTeamFormat = formatid;
|
||||
} else if (this.sourceEl[0].offsetParent.className === 'tournament-box active') {
|
||||
var room = app.dispatchingPopup.options.room;
|
||||
app.rooms[room].tournamentBox.curTeamIndex = i;
|
||||
app.rooms[this.room].tournamentBox.curTeamIndex = i;
|
||||
}
|
||||
this.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user