Fix slash commands null guard

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2020-07-18 11:40:45 +01:00
parent 58532f2ac4
commit 8480d387cc
1 changed files with 1 additions and 1 deletions

View File

@ -1049,7 +1049,7 @@ export function parseCommandString(input) {
// trim any trailing whitespace, as it can confuse the parser for
// IRC-style commands
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)*))?$/);
let cmd;