diff options
author | Phil Hughes <me@iamphill.com> | 2018-12-06 17:39:29 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-12-06 17:39:29 +0300 |
commit | 2ed65be1c339346d316dfb2403fc06b82713cf21 (patch) | |
tree | 3fa233719f254ed16438799f040b40067ec49185 /app/assets/javascripts/diffs/store/utils.js | |
parent | 71da313cd43bcbbbc8ec483944f887bacc518d81 (diff) |
Fixed renamed and mode changed diff viewers
Renders mode changed and renamed file merge request diff
viewers on the frontend.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52607
Diffstat (limited to 'app/assets/javascripts/diffs/store/utils.js')
-rw-r--r-- | app/assets/javascripts/diffs/store/utils.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/diffs/store/utils.js b/app/assets/javascripts/diffs/store/utils.js index 54b9ee4d2d6..5c6b20109bb 100644 --- a/app/assets/javascripts/diffs/store/utils.js +++ b/app/assets/javascripts/diffs/store/utils.js @@ -324,5 +324,9 @@ export const generateTreeList = files => export const getDiffMode = diffFile => { const diffModeKey = Object.keys(diffModes).find(key => diffFile[`${key}_file`]); - return diffModes[diffModeKey] || diffModes.replaced; + return ( + diffModes[diffModeKey] || + (diffFile.mode_changed && diffModes.mode_changed) || + diffModes.replaced + ); }; |