fix: 文件文字文件消息, 但是文字(trim)为空导致的显示问题
This commit is contained in:
@@ -29,9 +29,11 @@ function prettyFlatParsedMessage(html: string) {
|
||||
let lastElementType = ''
|
||||
function checkContinuousElement(tagName: string) {
|
||||
if (lastElementType != tagName) {
|
||||
if (lastElementType == 'chat-text')
|
||||
console.log(lastElementType, ls.map((v) => v.innerHTML))
|
||||
if (textElementTags.indexOf(lastElementType) != -1) {
|
||||
if (ls.map((v) => v.innerHTML).join('').trim() != '')
|
||||
ret += `<chat-text-container>${ls.map((v) => v.outerHTML).join('')}</chat-text-container>`
|
||||
else
|
||||
} else
|
||||
ret += ls.map((v) => v.outerHTML).join('')
|
||||
ls = []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user