From 6b060337a47df6fdbaa212963dfbf434ac3c224a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=A4=AA?= Date: Mon, 14 Apr 2014 00:05:08 +1000 Subject: [PATCH] Fix bug where the user is not the user in the tournament --- tournaments/frontend.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tournaments/frontend.js b/tournaments/frontend.js index 0e327fac39..4fd1cd6ac7 100644 --- a/tournaments/frontend.js +++ b/tournaments/frontend.js @@ -171,7 +171,8 @@ var Tournament = (function () { // "Ghost" users sometimes end up in the tournament because they've merged with another user. // This function is to remove those ghost users from the tournament. this.generator.getUsers().forEach(function (user) { - if (!Users.getExact(user.userid)) + var realUser = Users.getExact(user.userid); + if (!realUser || realUser !== user) // The two following functions are called without their second argument, // but the second argument will not be used in this situation if (this.isTournamentStarted) {