소스 검색

use spread syntax to fix bug in PageCommentList

yuto-oweseek 4 년 전
부모
커밋
fc43c931bd
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  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);
       }