bugfix: don't error if emoji not found
This commit is contained in:
parent
15ec862da0
commit
ca8689fc88
1 changed files with 15 additions and 10 deletions
|
@ -234,6 +234,8 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
case 'emojiCode': {
|
||||
const emoj = this.status.emojis.find((emoji) => emoji.shortcode === token.props.name)
|
||||
if (emoj) {
|
||||
return [h('div', {
|
||||
class: 'still-image emoji img'
|
||||
},
|
||||
|
@ -244,6 +246,9 @@ export default defineComponent({
|
|||
src: this.status.emojis.find((emoji) => emoji.shortcode === token.props.name).static_url
|
||||
})]
|
||||
)]
|
||||
} else {
|
||||
return `:${token.props.name}:`
|
||||
}
|
||||
}
|
||||
|
||||
case 'unicodeEmoji': {
|
||||
|
|
Loading…
Reference in a new issue