diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-02-13 14:39:48 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-02-13 14:39:48 +0000 |
commit | d5f4a8dc98d8bd58ac70857c2487a542c82c79e1 (patch) | |
tree | 2566b395e8c2e16d6eec1e1238ea33935a7685fc /app | |
parent | 301e4a68549ec41ea5812797ab2091082b9fe3a7 (diff) | |
parent | a64bc0c1cdfa1576b5c28e24eb2ff72eb04e5961 (diff) | |
download | gitlab-ce-d5f4a8dc98d8bd58ac70857c2487a542c82c79e1.tar.gz |
Merge branch 'diff-fix-duplicate-key-error' into 'master'
Fixed diff rendering causing a duplicate key warning
Closes #56797
See merge request gitlab-org/gitlab-ce!24634
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/diffs/store/mutations.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/diffs/store/utils.js | 1 |
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) { |