forked from AkkomaGang/akkoma-fe
Match users using startsWith instead of match.
This commit is contained in:
parent
b68ebf3056
commit
74a6df8a55
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ const PostStatusForm = {
|
||||||
const firstchar = this.textAtCaret.charAt(0)
|
const firstchar = this.textAtCaret.charAt(0)
|
||||||
if (firstchar === '@') {
|
if (firstchar === '@') {
|
||||||
const matchedUsers = filter(this.users, (user) => (String(user.name + user.screen_name)).toUpperCase()
|
const matchedUsers = filter(this.users, (user) => (String(user.name + user.screen_name)).toUpperCase()
|
||||||
.match(this.textAtCaret.slice(1).toUpperCase()))
|
.startsWith(this.textAtCaret.slice(1).toUpperCase()))
|
||||||
if (matchedUsers.length <= 0) {
|
if (matchedUsers.length <= 0) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue