diff --git a/ladders-matchmaker.js b/ladders-matchmaker.js index 54546bc9cd3cc..8500440e7d5d9 100644 --- a/ladders-matchmaker.js +++ b/ladders-matchmaker.js @@ -63,9 +63,11 @@ class Matchmaker { formatid = Dex.getFormat(formatid).id; return Promise.all([ + Promise.resolve(user.userid), user.prepBattle(formatid, 'search', null), Ladders(formatid).getRating(user.userid), - ]).then(([validTeam, rating]) => { + ]).then(([userId, validTeam, rating]) => { + if (userId !== user.userid) return; return this.finishSearchBattle(user, formatid, validTeam, rating); }, err => { // Rejects iff we retrieved the rating but the user had changed their name;