Commit b6a9ff12 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'lm-replace-underscore-lodash-issuable-suggestions' into 'master'

Replaces underscore with lodash and native func

See merge request gitlab-org/gitlab!25572
parents b188d527 17b84b6a
<script>
import _ from 'underscore';
import { GlTooltipDirective } from '@gitlab/ui';
import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
......@@ -48,7 +47,7 @@ export default {
},
computed: {
isSearchEmpty() {
return _.isEmpty(this.search);
return !this.search.length;
},
showSuggestions() {
return !this.isSearchEmpty && this.issues.length && !this.loading;
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
import _ from 'underscore';
import { uniqueId } from 'lodash';
import { GlLink, GlTooltip, GlTooltipDirective } from '@gitlab/ui';
import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
......@@ -36,13 +36,13 @@ export default {
counts() {
return [
{
id: _.uniqueId(),
id: uniqueId(),
icon: 'thumb-up',
tooltipTitle: __('Upvotes'),
count: this.suggestion.upvotes,
},
{
id: _.uniqueId(),
id: uniqueId(),
icon: 'comment',
tooltipTitle: __('Comments'),
count: this.suggestion.userNotesCount,
......
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