mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-10-02 14:17:43 -05:00
Fix a crash when trying to log in
This commit is contained in:
4
users.js
4
users.js
@@ -384,7 +384,7 @@ var User = (function () {
|
||||
this.renamePending = name;
|
||||
var self = this;
|
||||
Verifier.verify(tokenData, tokenSig, function(success, tokenData) {
|
||||
self.finishRename(success, tokenData, token);
|
||||
self.finishRename(success, tokenData, token, auth);
|
||||
});
|
||||
} else {
|
||||
this.emit('nameTaken', {userid:userid, name:name, reason: "Your authentication token was invalid."});
|
||||
@@ -392,7 +392,7 @@ var User = (function () {
|
||||
|
||||
return false;
|
||||
};
|
||||
User.prototype.finishRename = function(success, tokenData, token) {
|
||||
User.prototype.finishRename = function(success, tokenData, token, auth) {
|
||||
var name = this.renamePending;
|
||||
var userid = toUserid(name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user