Skip to content

Commit c47e0ef

Browse files
Fix potential key duplication
1 parent 1ee5c5c commit c47e0ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/notes/Document.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function Document({
153153
}
154154
onFocus={() => setFocused([index, undefined])}
155155
onDuplicate={() => {
156-
insertAfter(block)
156+
insertAfter(addKey({...block}))
157157
setFocused([index + 1, focused?.[1]])
158158
}}
159159
onReplace={replace}

0 commit comments

Comments
 (0)