Commit c3012dd9 authored by Fatih Acet's avatar Fatih Acet

Merge branch...

Merge branch '196688-replace-underscore-with-lodash-for-app-assets-javascripts-deploy_keys' into 'master'

Resolve "Replace underscore with lodash for ./app/assets/javascripts/deploy_keys"

Closes #196688

See merge request gitlab-org/gitlab!24965
parents b9bd2744 f85d2c7d
<script> <script>
import _ from 'underscore'; import { head, tail } from 'lodash';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
import icon from '~/vue_shared/components/icon.vue'; import icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
...@@ -48,8 +48,7 @@ export default { ...@@ -48,8 +48,7 @@ export default {
const projects = [...this.deployKey.deploy_keys_projects]; const projects = [...this.deployKey.deploy_keys_projects];
if (this.projectId !== null) { if (this.projectId !== null) {
const indexOfCurrentProject = _.findIndex( const indexOfCurrentProject = projects.findIndex(
projects,
project => project =>
project && project &&
project.project && project.project &&
...@@ -66,10 +65,10 @@ export default { ...@@ -66,10 +65,10 @@ export default {
return projects; return projects;
}, },
firstProject() { firstProject() {
return _.head(this.projects); return head(this.projects);
}, },
restProjects() { restProjects() {
return _.tail(this.projects); return tail(this.projects);
}, },
restProjectsTooltip() { restProjectsTooltip() {
return sprintf(s__('DeployKeys|Expand %{count} other projects'), { return sprintf(s__('DeployKeys|Expand %{count} other projects'), {
......
---
title: Replace underscore with lodash for ./app/assets/javascripts/deploy_keys
merge_request: 24965
author: Jacopo Beschi @jacopo-beschi
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment