diff --git a/ts/components/CompositionInput.tsx b/ts/components/CompositionInput.tsx index 9eb402c41..b30721b98 100644 --- a/ts/components/CompositionInput.tsx +++ b/ts/components/CompositionInput.tsx @@ -140,7 +140,7 @@ function getWordAtIndex( const word = str.slice(start, end); - if (word === ':') { + if (word === ':' && str.length > 1) { return getWordAtIndex(str, index + 1); }