Composition Input: If string is :
alone, do not recurse
This commit is contained in:
parent
f9b01f007f
commit
3b604bb13d
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue