mirror of
https://gitee.com/lijingbo-2021/open-anylink-web.git
synced 2026-05-23 15:47:48 +00:00
重复表情bug
This commit is contained in:
@@ -178,11 +178,10 @@ export const emojiTrans = (content) => {
|
||||
return content
|
||||
}
|
||||
|
||||
for (let i = 0; i < matches.length; i++) {
|
||||
const match = matches[i]
|
||||
const emoji = emojis[match]
|
||||
content = content.replace(match, emoji)
|
||||
}
|
||||
new Set(matches).forEach((item) => {
|
||||
const emoji = emojis[item]
|
||||
content = content.replaceAll(item, emoji)
|
||||
})
|
||||
|
||||
return content
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user