Skip to content

Commit 8d871c3

Browse files
authored
fix: mr commits display bug (erda-project#4041)
1 parent 7de68c7 commit 8d871c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shell/app/modules/application/pages/repo/components/mr-comments.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ export const PureCommentList = ({ comments = [] }: ICommentList) => {
170170
/>
171171
);
172172
}
173-
const { newPath, oldLine, newLine } = comment.data;
174-
const lineKey = `${oldLine}_${newLine}`;
173+
const { newPath, oldLine, newLine, oldLineTo, newLineTo } = comment.data;
174+
const lineKey = oldLineTo && newLineTo ? `${oldLineTo}_${newLineTo}` : `${oldLine}_${newLine}`;
175175
// 每个文件块只显示一行相关的评论
176176
const curCommentMap = {
177177
[lineKey]: fileCommentMap[newPath][lineKey],

0 commit comments

Comments
 (0)