diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 09:09:13 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 09:09:13 +0000 |
commit | 1ac794623a8be5dee111716a44dd04ff708f3541 (patch) | |
tree | 6c18f9fbe0bd9978bd3e8d9b083d3a0ca180686e /app/assets/javascripts/frequent_items | |
parent | 5247fe0bef72fa922841a79d5dbefb47d95112fa (diff) | |
download | gitlab-ce-1ac794623a8be5dee111716a44dd04ff708f3541.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/frequent_items')
3 files changed, 6 insertions, 6 deletions
diff --git a/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue b/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue index 6188d41ae96..3276d85f1cd 100644 --- a/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue +++ b/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue @@ -1,6 +1,6 @@ <script> /* eslint-disable vue/require-default-prop */ -import _ from 'underscore'; +import { isEmpty, isString } from 'lodash'; import Identicon from '~/vue_shared/components/identicon.vue'; import highlight from '~/lib/utils/highlight'; import { truncateNamespace } from '~/lib/utils/text_utility'; @@ -39,7 +39,7 @@ export default { }, computed: { hasAvatar() { - return _.isString(this.avatarUrl) && !_.isEmpty(this.avatarUrl); + return isString(this.avatarUrl) && !isEmpty(this.avatarUrl); }, truncatedNamespace() { return truncateNamespace(this.namespace); diff --git a/app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue b/app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue index c69e1b792dc..40add09f25d 100644 --- a/app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue +++ b/app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue @@ -1,5 +1,5 @@ <script> -import _ from 'underscore'; +import { debounce } from 'lodash'; import { mapActions } from 'vuex'; import Icon from '~/vue_shared/components/icon.vue'; import eventHub from '../event_hub'; @@ -21,7 +21,7 @@ export default { }, }, watch: { - searchQuery: _.debounce(function debounceSearchQuery() { + searchQuery: debounce(function debounceSearchQuery() { this.setSearchQuery(this.searchQuery); }, 500), }, diff --git a/app/assets/javascripts/frequent_items/utils.js b/app/assets/javascripts/frequent_items/utils.js index 5188d6118ac..a992480c22b 100644 --- a/app/assets/javascripts/frequent_items/utils.js +++ b/app/assets/javascripts/frequent_items/utils.js @@ -1,4 +1,4 @@ -import _ from 'underscore'; +import { take } from 'lodash'; import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils'; import sanitize from 'sanitize-html'; import { FREQUENT_ITEMS, HOUR_IN_MS } from './constants'; @@ -31,7 +31,7 @@ export const getTopFrequentItems = items => { return 0; }); - return _.first(frequentItems, frequentItemsCount); + return take(frequentItems, frequentItemsCount); }; export const updateExistingFrequentItem = (frequentItem, item) => { |