mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
parent
eabd303c8e
commit
c340746a87
@ -42,7 +42,8 @@ export class TextMessageView extends BaseMessageView {
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const shouldRemove = (element) => element?.nodeType === Node.ELEMENT_NODE && element.className !== "ReplyPreviewView";
|
// exclude comment nodes as they are used by t.map and friends for placeholders
|
||||||
|
const shouldRemove = (element) => element?.nodeType !== Node.COMMENT_NODE && element.className !== "ReplyPreviewView";
|
||||||
|
|
||||||
t.mapSideEffect(vm => vm.body, body => {
|
t.mapSideEffect(vm => vm.body, body => {
|
||||||
while (shouldRemove(container.lastChild)) {
|
while (shouldRemove(container.lastChild)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user