Commit a3f8074a authored by sstern's avatar sstern

Replace underscore with lodash

parent 52d8ed21
<script>
import _ from 'underscore';
import { mapState, mapActions } from 'vuex';
import { GlModal, GlModalDirective, GlButton, GlDashboardSkeleton } from '@gitlab/ui';
import VueDraggable from 'vuedraggable';
......@@ -58,7 +57,7 @@ export default {
return this.searchCount > 0;
},
okDisabled() {
return _.isEmpty(this.selectedProjects);
return Object.keys(this.selectedProjects).length === 0;
},
},
created() {
......
<script>
import { isEmpty } from 'lodash';
import { mapActions } from 'vuex';
import _ from 'underscore';
import Alerts from 'ee/vue_shared/dashboards/components/alerts.vue';
import TimeAgo from 'ee/vue_shared/dashboards/components/time_ago.vue';
import ProjectPipeline from 'ee/vue_shared/dashboards/components/project_pipeline.vue';
......@@ -76,15 +76,13 @@ export default {
return __('The branch for this project has no active pipeline configuration.');
},
user() {
return this.lastPipeline && !_.isEmpty(this.lastPipeline.user)
? this.lastPipeline.user
: null;
return this.lastPipeline && !isEmpty(this.lastPipeline.user) ? this.lastPipeline.user : null;
},
lastPipeline() {
return !_.isEmpty(this.project.last_pipeline) ? this.project.last_pipeline : null;
return !isEmpty(this.project.last_pipeline) ? this.project.last_pipeline : null;
},
commitRef() {
return this.lastPipeline && !_.isEmpty(this.lastPipeline.ref)
return this.lastPipeline && !isEmpty(this.lastPipeline.ref)
? {
...this.lastPipeline.ref,
ref_url: this.lastPipeline.ref.path,
......
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