summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/components/inline_diff_table_row.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/diffs/components/inline_diff_table_row.vue')
-rw-r--r--app/assets/javascripts/diffs/components/inline_diff_table_row.vue16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/assets/javascripts/diffs/components/inline_diff_table_row.vue b/app/assets/javascripts/diffs/components/inline_diff_table_row.vue
index bd99fcb71b8..168e8c6c14e 100644
--- a/app/assets/javascripts/diffs/components/inline_diff_table_row.vue
+++ b/app/assets/javascripts/diffs/components/inline_diff_table_row.vue
@@ -28,10 +28,6 @@ export default {
type: String,
required: true,
},
- contextLinesPath: {
- type: String,
- required: true,
- },
line: {
type: Object,
required: true,
@@ -41,6 +37,11 @@ export default {
required: false,
default: false,
},
+ isCommented: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
},
data() {
return {
@@ -51,7 +52,10 @@ export default {
...mapGetters('diffs', ['fileLineCoverage']),
...mapState({
isHighlighted(state) {
- return this.line.line_code !== null && this.line.line_code === state.diffs.highlightedRow;
+ if (this.isCommented) return true;
+
+ const lineCode = this.line.line_code;
+ return lineCode ? lineCode === state.diffs.highlightedRow : false;
},
}),
isContextLine() {
@@ -106,7 +110,6 @@ export default {
>
<diff-table-cell
:file-hash="fileHash"
- :context-lines-path="contextLinesPath"
:line="line"
:line-type="oldLineType"
:is-bottom="isBottom"
@@ -117,7 +120,6 @@ export default {
/>
<diff-table-cell
:file-hash="fileHash"
- :context-lines-path="contextLinesPath"
:line="line"
:line-type="newLineType"
:is-bottom="isBottom"