diff options
| author | scarlett <nia@netbsd.org> | 2018-08-26 13:51:21 +0100 |
|---|---|---|
| committer | scarlett <nia@netbsd.org> | 2018-08-26 13:51:21 +0100 |
| commit | 74a6df8a551e1103e3ed70d2561dd3a488fba17e (patch) | |
| tree | cd943c054e9dba536e7aa6485f9e81b60bf32266 /src | |
| parent | b68ebf3056c7fed2f8d30728efb74518c07b6bef (diff) | |
Match users using startsWith instead of match.
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/post_status_form/post_status_form.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 1fca4950..06a428ff 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -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 } |
