diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-10 12:08:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-10 12:08:56 +0300 |
commit | b4ded0ba7b4d2cdbed5b1f331cf2083a25ee4d7c (patch) | |
tree | 6694fa9d8f3e226597cc01dfb8e3e07b50ae85b6 /app/assets/javascripts/error_tracking_settings | |
parent | 2aaef94c80937d9d188f7b9cbbad2dcd1508c3c1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/error_tracking_settings')
-rw-r--r-- | app/assets/javascripts/error_tracking_settings/store/getters.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/error_tracking_settings/store/mutations.js | 9 |
2 files changed, 5 insertions, 8 deletions
diff --git a/app/assets/javascripts/error_tracking_settings/store/getters.js b/app/assets/javascripts/error_tracking_settings/store/getters.js index d77e5f15469..e27fe9c079e 100644 --- a/app/assets/javascripts/error_tracking_settings/store/getters.js +++ b/app/assets/javascripts/error_tracking_settings/store/getters.js @@ -1,4 +1,4 @@ -import _ from 'underscore'; +import { isMatch } from 'lodash'; import { __, s__, sprintf } from '~/locale'; import { getDisplayName } from '../utils'; @@ -7,7 +7,7 @@ export const hasProjects = state => Boolean(state.projects) && state.projects.le export const isProjectInvalid = (state, getters) => Boolean(state.selectedProject) && getters.hasProjects && - !state.projects.some(project => _.isMatch(state.selectedProject, project)); + !state.projects.some(project => isMatch(state.selectedProject, project)); export const dropdownLabel = (state, getters) => { if (state.selectedProject !== null) { diff --git a/app/assets/javascripts/error_tracking_settings/store/mutations.js b/app/assets/javascripts/error_tracking_settings/store/mutations.js index 133f25264b9..e1986eb694b 100644 --- a/app/assets/javascripts/error_tracking_settings/store/mutations.js +++ b/app/assets/javascripts/error_tracking_settings/store/mutations.js @@ -1,4 +1,4 @@ -import _ from 'underscore'; +import { pick } from 'lodash'; import { convertObjectPropsToCamelCase, parseBoolean } from '~/lib/utils/common_utils'; import * as types from './mutation_types'; import { projectKeys } from '../utils'; @@ -12,7 +12,7 @@ export default { .map(convertObjectPropsToCamelCase) // The `pick` strips out extra properties returned from Sentry. // Such properties could be problematic later, e.g. when checking whether `projects` contains `selectedProject` - .map(project => _.pick(project, projectKeys)); + .map(project => pick(project, projectKeys)); }, [types.RESET_CONNECT](state) { state.connectSuccessful = false; @@ -29,10 +29,7 @@ export default { state.operationsSettingsEndpoint = operationsSettingsEndpoint; if (project) { - state.selectedProject = _.pick( - convertObjectPropsToCamelCase(JSON.parse(project)), - projectKeys, - ); + state.selectedProject = pick(convertObjectPropsToCamelCase(JSON.parse(project)), projectKeys); } }, [types.UPDATE_API_HOST](state, apiHost) { |