Răsfoiți Sursa

use spread syntax to fix bug in PageCommentList

yuto-oweseek 4 ani în urmă
părinte
comite
fc43c931bd
1 a modificat fișierele cu 1 adăugiri și 2 ștergeri
  1. 1 2
      packages/app/src/components/PageCommentList.tsx

+ 1 - 2
packages/app/src/components/PageCommentList.tsx

@@ -86,8 +86,7 @@ const PageCommentList:FC<Props> = memo((props:Props):JSX.Element => {
           return preprocessComment(highlightedComment);
         }));
         const preprocessedComments: ICommentHasIdList = comments.map((comment, index) => {
-          comment.comment = preprocessedCommentList[index];
-          return comment;
+          return { ...comment, comment: preprocessedCommentList[index] };
         });
         setFormatedComments(preprocessedComments);
       }