diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-09 15:07:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-09 15:07:06 +0300 |
commit | 587c487202f9bc0d1b07698b83fd10cf5b89d6d0 (patch) | |
tree | ce5bfcc5fd928f1f19eb6b4a1a38a6395944e306 /app/assets/javascripts/diffs | |
parent | bbfe48cb82476eb8b3f6e52f728d5f39ac6bc385 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs')
-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, }; } |