diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
commit | 9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch) | |
tree | 70467ae3692a0e35e5ea56bcb803eb512a10bedb /app/assets/javascripts/diffs/store/modules | |
parent | 4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff) |
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'app/assets/javascripts/diffs/store/modules')
-rw-r--r-- | app/assets/javascripts/diffs/store/modules/diff_state.js | 6 | ||||
-rw-r--r-- | app/assets/javascripts/diffs/store/modules/index.js | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/app/assets/javascripts/diffs/store/modules/diff_state.js b/app/assets/javascripts/diffs/store/modules/diff_state.js index f93435363ec..1674d3d3b5a 100644 --- a/app/assets/javascripts/diffs/store/modules/diff_state.js +++ b/app/assets/javascripts/diffs/store/modules/diff_state.js @@ -9,7 +9,8 @@ import { import { fileByFile } from '../../utils/preferences'; import { getDefaultWhitespace } from '../utils'; -const viewTypeFromQueryString = getParameterValues('view')[0]; +const getViewTypeFromQueryString = () => getParameterValues('view')[0]; + const viewTypeFromCookie = Cookies.get(DIFF_VIEW_COOKIE_NAME); const defaultViewType = INLINE_DIFF_VIEW_TYPE; const whiteSpaceFromQueryString = getParameterValues('w')[0]; @@ -23,6 +24,7 @@ export default () => ({ addedLines: null, removedLines: null, endpoint: '', + endpointUpdateUser: '', basePath: '', commit: null, startVersion: null, // Null unless a target diff is selected for comparison that is not the "base" diff @@ -30,7 +32,7 @@ export default () => ({ coverageFiles: {}, mergeRequestDiffs: [], mergeRequestDiff: null, - diffViewType: viewTypeFromQueryString || viewTypeFromCookie || defaultViewType, + diffViewType: getViewTypeFromQueryString() || viewTypeFromCookie || defaultViewType, tree: [], treeEntries: {}, showTreeList: true, diff --git a/app/assets/javascripts/diffs/store/modules/index.js b/app/assets/javascripts/diffs/store/modules/index.js index 6860e24db6b..03d11e60745 100644 --- a/app/assets/javascripts/diffs/store/modules/index.js +++ b/app/assets/javascripts/diffs/store/modules/index.js @@ -1,7 +1,7 @@ -import * as actions from '../actions'; +import * as actions from 'ee_else_ce/diffs/store/actions'; +import createState from 'ee_else_ce/diffs/store/modules/diff_state'; +import mutations from 'ee_else_ce/diffs/store/mutations'; import * as getters from '../getters'; -import mutations from '../mutations'; -import createState from './diff_state'; export default () => ({ namespaced: true, |