mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-06 05:27:54 -05:00
Fix this.inputUsername with no comma
This fixes the this.inputUsername API for .splitTarget for commands. Mainly relevant to using /lock and /ban on a user who's renamed themself.
This commit is contained in:
parent
8fd4ea2bae
commit
800983f8f7
|
|
@ -375,6 +375,7 @@ var Context = exports.Context = (function () {
|
|||
if (commaIndex < 0) {
|
||||
var targetUser = Users.get(target, exactName);
|
||||
this.targetUser = targetUser;
|
||||
this.inputUsername = target.trim();
|
||||
this.targetUsername = targetUser ? targetUser.name : target;
|
||||
return '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user