aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorscarlett <nia@netbsd.org>2018-08-26 13:50:36 +0100
committerscarlett <nia@netbsd.org>2018-08-26 13:50:36 +0100
commitb68ebf3056c7fed2f8d30728efb74518c07b6bef (patch)
treeddbf39cadfb6bb3faf11dc604150bcfcbb34c03d /src
parentbc4f09b775c0224b273b5db96fabf6bf41bc9e32 (diff)
Match emoji using startsWith instead of match.
Diffstat (limited to 'src')
-rw-r--r--src/components/post_status_form/post_status_form.js2
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 7d40bc3c..1fca4950 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -89,7 +89,7 @@ const PostStatusForm = {
}))
} else if (firstchar === ':') {
if (this.textAtCaret === ':') { return }
- const matchedEmoji = filter(this.emoji.concat(this.customEmoji), (emoji) => emoji.shortcode.match(this.textAtCaret.slice(1)))
+ const matchedEmoji = filter(this.emoji.concat(this.customEmoji), (emoji) => emoji.shortcode.startsWith(this.textAtCaret.slice(1)))
if (matchedEmoji.length <= 0) {
return false
}