mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Preact: Trim command targets (#2439)
This commit is contained in:
parent
917855a0ec
commit
2747808d6b
|
|
@ -1626,7 +1626,7 @@ export class PSRoom extends PSStreamModel<Args | null> implements RoomOptions {
|
|||
if (!line.startsWith('/') || line.startsWith('//')) return line;
|
||||
const spaceIndex = line.indexOf(' ');
|
||||
const cmd = (spaceIndex >= 0 ? line.slice(1, spaceIndex) : line.slice(1)) as 'parsed';
|
||||
const target = spaceIndex >= 0 ? line.slice(spaceIndex + 1) : '';
|
||||
const target = spaceIndex >= 0 ? line.slice(spaceIndex + 1).trim() : '';
|
||||
|
||||
const cmdHandler = this.globalClientCommands[cmd] || this.clientCommands?.[cmd];
|
||||
if (!cmdHandler) return line;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user