Fix slash commands null guard
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
58532f2ac4
commit
8480d387cc
1 changed files with 1 additions and 1 deletions
|
@ -1049,7 +1049,7 @@ export function parseCommandString(input) {
|
||||||
// trim any trailing whitespace, as it can confuse the parser for
|
// trim any trailing whitespace, as it can confuse the parser for
|
||||||
// IRC-style commands
|
// IRC-style commands
|
||||||
input = input.replace(/\s+$/, '');
|
input = input.replace(/\s+$/, '');
|
||||||
if (input[0] !== '/') return null; // not a command
|
if (input[0] !== '/') return {}; // not a command
|
||||||
|
|
||||||
const bits = input.match(/^(\S+?)(?: +((.|\n)*))?$/);
|
const bits = input.match(/^(\S+?)(?: +((.|\n)*))?$/);
|
||||||
let cmd;
|
let cmd;
|
||||||
|
|
Loading…
Reference in a new issue