File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -51,20 +51,17 @@ export const Comment = ({
5151
5252 const dict = useDictionary ( ) ;
5353
54- const commentEditor = useCreateBlockNote (
55- {
56- initialContent : comment . body ,
57- trailingBlock : false ,
58- dictionary : {
59- ...dict ,
60- placeholders : {
61- emptyDocument : dict . placeholders . edit_comment ,
62- } ,
54+ const commentEditor = useCreateBlockNote ( {
55+ initialContent : comment . body ,
56+ trailingBlock : false ,
57+ dictionary : {
58+ ...dict ,
59+ placeholders : {
60+ emptyDocument : dict . placeholders . edit_comment ,
6361 } ,
64- schema : editor . comments . commentEditorSchema || defaultCommentEditorSchema ,
6562 } ,
66- [ comment . body ] ,
67- ) ;
63+ schema : editor . comments . commentEditorSchema || defaultCommentEditorSchema ,
64+ } ) ;
6865
6966 const Components = useComponentsContext ( ) ! ;
7067
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export const Comments = ({
2323 // Maps all comments to elements.
2424 const comments = thread . comments . map ( ( comment , index ) => (
2525 < Comment
26- key = { comment . id }
26+ key = { comment . id + JSON . stringify ( comment . body || "{}" ) }
2727 thread = { thread }
2828 comment = { comment }
2929 showResolveButton = { index === 0 }
You can’t perform that action at this time.
0 commit comments