Commit cee271ee authored by Tim Zallmann's avatar Tim Zallmann

Fix for displaying left side comments when no discussion available

parent f8214f95
...@@ -57,7 +57,9 @@ export default { ...@@ -57,7 +57,9 @@ export default {
); );
}, },
showRightSideCommentForm() { showRightSideCommentForm() {
return this.line.right.type && this.diffLineCommentForms[this.rightLineCode]; return (
this.line.right && this.line.right.type && this.diffLineCommentForms[this.rightLineCode]
);
}, },
className() { className() {
return (this.left && this.line.left.discussions.length > 0) || return (this.left && this.line.left.discussions.length > 0) ||
......
...@@ -49,12 +49,14 @@ export const assignDiscussionsToDiff = ({ state }, allLineDiscussions) => { ...@@ -49,12 +49,14 @@ export const assignDiscussionsToDiff = ({ state }, allLineDiscussions) => {
} }
} }
const targetInlineLine = selectedFile.highlightedDiffLines.find( if (selectedFile.highlightedDiffLines) {
line => line.lineCode === discussions[0].line_code, const targetInlineLine = selectedFile.highlightedDiffLines.find(
); line => line.lineCode === discussions[0].line_code,
);
if (targetInlineLine) { if (targetInlineLine) {
Object.assign(targetInlineLine, { discussions }); Object.assign(targetInlineLine, { discussions });
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment