Skip to content

Commit

Permalink
fix: insert items from other users
Browse files Browse the repository at this point in the history
  • Loading branch information
sorax committed May 21, 2024
1 parent 72f7eed commit 80fccbe
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions assets/js/hooks/events/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down

0 comments on commit 80fccbe

Please sign in to comment.