Skip to content

Commit

Permalink
fix: mr commits display bug (#4041)
Browse files Browse the repository at this point in the history
  • Loading branch information
hujiahao-hjh committed Apr 28, 2024
1 parent 7de68c7 commit 8d871c3
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -170,8 +170,8 @@ export const PureCommentList = ({ comments = [] }: ICommentList) => {
/>
);
}
const { newPath, oldLine, newLine } = comment.data;
const lineKey = `${oldLine}_${newLine}`;
const { newPath, oldLine, newLine, oldLineTo, newLineTo } = comment.data;
const lineKey = oldLineTo && newLineTo ? `${oldLineTo}_${newLineTo}` : `${oldLine}_${newLine}`;
// 每个文件块只显示一行相关的评论
const curCommentMap = {
[lineKey]: fileCommentMap[newPath][lineKey],
Expand Down

0 comments on commit 8d871c3

Please sign in to comment.