From 74a6df8a551e1103e3ed70d2561dd3a488fba17e Mon Sep 17 00:00:00 2001 From: scarlett Date: Sun, 26 Aug 2018 13:51:21 +0100 Subject: [PATCH] Match users using startsWith instead of match. --- src/components/post_status_form/post_status_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }