From 3b604bb13d209eb33e4985ce2224d2109ee7546e Mon Sep 17 00:00:00 2001 From: Ken Powers Date: Fri, 13 Dec 2019 17:55:41 -0800 Subject: [PATCH] Composition Input: If string is `:` alone, do not recurse --- ts/components/CompositionInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }