Match users using startsWith instead of match.
This commit is contained in:
parent
b68ebf3056
commit
74a6df8a55
@ -75,7 +75,7 @@ const PostStatusForm = {
|
||||
const firstchar = this.textAtCaret.charAt(0)
|
||||
if (firstchar === '@') {
|
||||
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) {
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user