Composition Input: If string is : alone, do not recurse

This commit is contained in:
Ken Powers 2019-12-13 17:55:41 -08:00 committed by Scott Nonnenberg
parent f9b01f007f
commit 3b604bb13d

View file

@ -140,7 +140,7 @@ function getWordAtIndex(
const word = str.slice(start, end);
if (word === ':') {
if (word === ':' && str.length > 1) {
return getWordAtIndex(str, index + 1);
}