From 8480d387cc9db59cfc69fd6d587b29f38e9c9e26 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 18 Jul 2020 11:40:45 +0100 Subject: [PATCH] Fix slash commands null guard Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/SlashCommands.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index ed69dd2204..40bf0a8e49 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -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;