Match emoji using startsWith instead of match.
This commit is contained in:
parent
bc4f09b775
commit
b68ebf3056
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue