fix: fix key

This commit is contained in:
fantasticit 2022-05-10 11:48:02 +08:00
parent f819b61f03
commit 512018a1c0
1 changed files with 2 additions and 3 deletions

View File

@ -17,9 +17,8 @@ const CommentInner = ({ data, depth, replyComment, editComment, deleteComment })
{(data || []).map((item) => {
const hasChildren = item.children && item.children.length;
return (
<>
<div key={item.id}>
<CommentItem
key={item.id}
comment={item}
replyComment={replyComment}
editComment={editComment}
@ -35,7 +34,7 @@ const CommentInner = ({ data, depth, replyComment, editComment, deleteComment })
deleteComment={deleteComment}
/>
) : null}
</>
</div>
);
})}
</div>