You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-03 00:33:22 +03:00 
			
		
		
		
	Fix slash commands null guard
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user