Composition Input: If string is :
alone, do not recurse
This commit is contained in:

committed by
Scott Nonnenberg

parent
f9b01f007f
commit
3b604bb13d
@@ -140,7 +140,7 @@ function getWordAtIndex(
|
|||||||
|
|
||||||
const word = str.slice(start, end);
|
const word = str.slice(start, end);
|
||||||
|
|
||||||
if (word === ':') {
|
if (word === ':' && str.length > 1) {
|
||||||
return getWordAtIndex(str, index + 1);
|
return getWordAtIndex(str, index + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user