From 80fccbe31a201f8257274bf29d3ae2f6d1bee36f Mon Sep 17 00:00:00 2001 From: sorax Date: Tue, 21 May 2024 22:08:57 +0200 Subject: [PATCH] fix: insert items from other users --- assets/js/hooks/events/handler.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/assets/js/hooks/events/handler.ts b/assets/js/hooks/events/handler.ts index 4c950bff..7a1e140b 100644 --- a/assets/js/hooks/events/handler.ts +++ b/assets/js/hooks/events/handler.ts @@ -40,14 +40,9 @@ export function handleList({ nodes }: { nodes: Node[] }) { export function handleInsert({ node }: { node: Node }) { const container: HTMLOListElement = this.el; - const item = getItemByNode(node); - if (item) { - node.dirty = false; - updateItem(node, container); - } else { - const newItem = createItem(node); - container.append(newItem); - } + const item = createItem(node); + container.append(item); + updateItem(node, container); } export function handleContentChange({ node }: { node: Node }) {