diff options
author | Amit Rathi <amit@hypertrack.io> | 2018-11-19 23:12:52 +0530 |
---|---|---|
committer | Amit Rathi <amit@hypertrack.io> | 2018-11-19 23:12:52 +0530 |
commit | 1c7372ad56cf50b992a77bf0f09bee8fa29c2026 (patch) | |
tree | 2c40f9e265b7db9ea85900713d7e9d8b584732c3 /app/assets/javascripts/diffs/components/diff_line_gutter_content.vue | |
parent | 9737cc8ab0f421213a5e36309741589beea88aa5 (diff) | |
parent | af1ed0e2bbabb72aff521aa2d67a4325dd94f711 (diff) | |
download | gitlab-ce-1c7372ad56cf50b992a77bf0f09bee8fa29c2026.tar.gz |
Merge branch 'master' into certmanager-temp
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.vue | 14 |
1 files changed, 7 insertions, 7 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 f4a9be19496..8f037eeefc4 100644 --- a/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue +++ b/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue @@ -73,7 +73,7 @@ export default { }), ...mapGetters(['isLoggedIn']), lineHref() { - return `#${this.line.lineCode || ''}`; + return `#${this.line.line_code || ''}`; }, shouldShowCommentButton() { return ( @@ -99,7 +99,7 @@ export default { methods: { ...mapActions('diffs', ['loadMoreLines', 'showCommentForm']), handleCommentButton() { - this.showCommentForm({ lineCode: this.line.lineCode }); + this.showCommentForm({ lineCode: this.line.line_code }); }, handleLoadMoreLines() { if (this.isRequesting) { @@ -108,8 +108,8 @@ export default { this.isRequesting = true; const endpoint = this.contextLinesPath; - const oldLineNumber = this.line.metaData.oldPos || 0; - const newLineNumber = this.line.metaData.newPos || 0; + const oldLineNumber = this.line.meta_data.old_pos || 0; + const newLineNumber = this.line.meta_data.new_pos || 0; const offset = newLineNumber - oldLineNumber; const bottom = this.isBottom; const { fileHash } = this; @@ -125,12 +125,12 @@ export default { to = lineNumber + UNFOLD_COUNT; } else { const diffFile = utils.findDiffFile(this.diffFiles, this.fileHash); - const indexForInline = utils.findIndexInInlineLines(diffFile.highlightedDiffLines, { + const indexForInline = utils.findIndexInInlineLines(diffFile.highlighted_diff_lines, { oldLineNumber, newLineNumber, }); - const prevLine = diffFile.highlightedDiffLines[indexForInline - 2]; - const prevLineNumber = (prevLine && prevLine.newLine) || 0; + const prevLine = diffFile.highlighted_diff_lines[indexForInline - 2]; + const prevLineNumber = (prevLine && prevLine.new_line) || 0; if (since <= prevLineNumber + 1) { since = prevLineNumber + 1; |