Commit f85d2c7d authored by Jacopo's avatar Jacopo

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

parent 59344b22
<script>
import _ from 'underscore';
import { head, tail } from 'lodash';
import { s__, sprintf } from '~/locale';
import icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip';
......@@ -48,8 +48,7 @@ export default {
const projects = [...this.deployKey.deploy_keys_projects];
if (this.projectId !== null) {
const indexOfCurrentProject = _.findIndex(
projects,
const indexOfCurrentProject = projects.findIndex(
project =>
project &&
project.project &&
......@@ -66,10 +65,10 @@ export default {
return projects;
},
firstProject() {
return _.head(this.projects);
return head(this.projects);
},
restProjects() {
return _.tail(this.projects);
return tail(this.projects);
},
restProjectsTooltip() {
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