diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/assets/javascripts/diffs/store | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/diffs/store')
-rw-r--r-- | app/assets/javascripts/diffs/store/getters_versions_dropdowns.js | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/app/assets/javascripts/diffs/store/getters_versions_dropdowns.js b/app/assets/javascripts/diffs/store/getters_versions_dropdowns.js index 65ffd42fa27..734407dec45 100644 --- a/app/assets/javascripts/diffs/store/getters_versions_dropdowns.js +++ b/app/assets/javascripts/diffs/store/getters_versions_dropdowns.js @@ -15,24 +15,19 @@ export const diffCompareDropdownTargetVersions = (state, getters) => { // startVersion only exists if the user has selected a version other // than "base" so if startVersion is null then base must be selected - const defaultMergeRefForDiffs = window.gon?.features?.defaultMergeRefForDiffs || false; const diffHeadParam = getParameterByName('diff_head'); - const diffHead = parseBoolean(diffHeadParam) || (!diffHeadParam && defaultMergeRefForDiffs); - const isBaseSelected = !state.startVersion && !diffHead; + const diffHead = parseBoolean(diffHeadParam) || !diffHeadParam; + const isBaseSelected = !state.startVersion; const isHeadSelected = !state.startVersion && diffHead; let baseVersion = null; - if ( - !defaultMergeRefForDiffs || - (defaultMergeRefForDiffs && !state.mergeRequestDiff.head_version_path) - ) { + if (!state.mergeRequestDiff.head_version_path) { baseVersion = { versionName: state.targetBranchName, version_index: DIFF_COMPARE_BASE_VERSION_INDEX, href: state.mergeRequestDiff.base_version_path, isBase: true, - selected: - isBaseSelected || (defaultMergeRefForDiffs && !state.mergeRequestDiff.head_version_path), + selected: isBaseSelected, }; } |