Commit 17b84b6a authored by lauraMon's avatar lauraMon

Replaces underscore with lodash and native func

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