summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-02-13 11:06:43 +0000
committerPhil Hughes <me@iamphill.com>2019-02-13 11:06:43 +0000
commita64bc0c1cdfa1576b5c28e24eb2ff72eb04e5961 (patch)
treecdbaf8d4945ecefe7c7c49607a0e82339e52f9bf /app/assets/javascripts/diffs
parentbfdd0247af843e19ca5bdf05a3804bf2d3de217d (diff)
downloadgitlab-ce-a64bc0c1cdfa1576b5c28e24eb2ff72eb04e5961.tar.gz
Fixed diff rendering causing a duplicate key warning
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56797
Diffstat (limited to 'app/assets/javascripts/diffs')
-rw-r--r--app/assets/javascripts/diffs/store/mutations.js1
-rw-r--r--app/assets/javascripts/diffs/store/utils.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/assets/javascripts/diffs/store/mutations.js b/app/assets/javascripts/diffs/store/mutations.js
index 7bbafe66199..5a27388863c 100644
--- a/app/assets/javascripts/diffs/store/mutations.js
+++ b/app/assets/javascripts/diffs/store/mutations.js
@@ -144,6 +144,7 @@ export default {
if (left || right) {
return {
+ ...line,
left: line.left ? mapDiscussions(line.left) : null,
right: line.right ? mapDiscussions(line.right, () => !left) : null,
};
diff --git a/app/assets/javascripts/diffs/store/utils.js b/app/assets/javascripts/diffs/store/utils.js
index effb6202327..062024b8cdd 100644
--- a/app/assets/javascripts/diffs/store/utils.js
+++ b/app/assets/javascripts/diffs/store/utils.js
@@ -161,6 +161,7 @@ export function addContextLines(options) {
const normalizedParallelLines = contextLines.map(line => ({
left: line,
right: line,
+ line_code: line.line_code,
}));
if (options.bottom) {