summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/diffs/components/diff_line_gutter_content.vue')
-rw-r--r--app/assets/javascripts/diffs/components/diff_line_gutter_content.vue6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue b/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue
index f1299408904..92891b37c1e 100644
--- a/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue
+++ b/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue
@@ -78,7 +78,7 @@ export default {
}),
...mapGetters(['isLoggedIn']),
lineHref() {
- return this.line.code ? `#${this.line.code}` : '#';
+ return this.line && this.line.code ? `#${this.line.code}` : '#';
},
shouldShowCommentButton() {
return (
@@ -92,10 +92,10 @@ export default {
);
},
hasDiscussions() {
- return this.line.discussions && this.line.discussions.length > 0;
+ return this.line && this.line.discussions && this.line.discussions.length > 0;
},
shouldShowAvatarsOnGutter() {
- if (!this.line.type && this.linePosition === LINE_POSITION_RIGHT) {
+ if (this.line && !this.line.type && this.linePosition === LINE_POSITION_RIGHT) {
return false;
}