mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-22 06:43:19 +00:00
Require at least 2 characters before showing autosuggestions (#5065)
This commit is contained in:
parent
6dfeb64326
commit
9c8aad612e
|
@ -20,7 +20,7 @@ const textAtCursorMatchesToken = (str, caretPosition) => {
|
||||||
word = str.slice(left, right + caretPosition);
|
word = str.slice(left, right + caretPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!word || word.trim().length < 2 || ['@', ':'].indexOf(word[0]) === -1) {
|
if (!word || word.trim().length < 3 || ['@', ':'].indexOf(word[0]) === -1) {
|
||||||
return [null, null];
|
return [null, null];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue