forked from mystiq/hydrogen-web
parent
eabd303c8e
commit
c340746a87
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue