diff options
author | Phil Hughes <me@iamphill.com> | 2019-02-13 11:06:43 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-02-13 11:06:43 +0000 |
commit | a64bc0c1cdfa1576b5c28e24eb2ff72eb04e5961 (patch) | |
tree | cdbaf8d4945ecefe7c7c49607a0e82339e52f9bf /app/assets/javascripts/diffs | |
parent | bfdd0247af843e19ca5bdf05a3804bf2d3de217d (diff) | |
download | gitlab-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.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) { |