Fix for displaying left side comments when no discussion available
This commit is contained in:
parent
f8214f9568
commit
cee271ee34
|
|
@ -57,7 +57,9 @@ export default {
|
|||
);
|
||||
},
|
||||
showRightSideCommentForm() {
|
||||
return this.line.right.type && this.diffLineCommentForms[this.rightLineCode];
|
||||
return (
|
||||
this.line.right && this.line.right.type && this.diffLineCommentForms[this.rightLineCode]
|
||||
);
|
||||
},
|
||||
className() {
|
||||
return (this.left && this.line.left.discussions.length > 0) ||
|
||||
|
|
|
|||
|
|
@ -49,12 +49,14 @@ export const assignDiscussionsToDiff = ({ state }, allLineDiscussions) => {
|
|||
}
|
||||
}
|
||||
|
||||
const targetInlineLine = selectedFile.highlightedDiffLines.find(
|
||||
line => line.lineCode === discussions[0].line_code,
|
||||
);
|
||||
if (selectedFile.highlightedDiffLines) {
|
||||
const targetInlineLine = selectedFile.highlightedDiffLines.find(
|
||||
line => line.lineCode === discussions[0].line_code,
|
||||
);
|
||||
|
||||
if (targetInlineLine) {
|
||||
Object.assign(targetInlineLine, { discussions });
|
||||
if (targetInlineLine) {
|
||||
Object.assign(targetInlineLine, { discussions });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue