From 143f196f8b3c40ceb7e9335a8dcc712b079519b9 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 18 Nov 2019 18:06:53 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/assets/javascripts/project_select.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'app/assets/javascripts/project_select.js') diff --git a/app/assets/javascripts/project_select.js b/app/assets/javascripts/project_select.js index 6a32cef79bc..66ce1ab5659 100644 --- a/app/assets/javascripts/project_select.js +++ b/app/assets/javascripts/project_select.js @@ -1,4 +1,4 @@ -/* eslint-disable func-names, no-var, one-var, no-else-return */ +/* eslint-disable func-names, no-else-return */ import $ from 'jquery'; import Api from './api'; @@ -7,7 +7,7 @@ import { s__ } from './locale'; const projectSelect = () => { $('.ajax-project-select').each(function(i, select) { - var placeholder; + let placeholder; const simpleFilter = $(select).data('simpleFilter') || false; const isInstantiated = $(select).data('select2'); this.groupId = $(select).data('groupId'); @@ -31,20 +31,17 @@ const projectSelect = () => { placeholder, minimumInputLength: 0, query: query => { - var finalCallback, projectsCallback; - finalCallback = function(projects) { - var data; - data = { + let projectsCallback; + const finalCallback = function(projects) { + const data = { results: projects, }; return query.callback(data); }; if (this.includeGroups) { projectsCallback = function(projects) { - var groupsCallback; - groupsCallback = function(groups) { - var data; - data = groups.concat(projects); + const groupsCallback = function(groups) { + const data = groups.concat(projects); return finalCallback(data); }; return Api.groups(query.term, {}, groupsCallback); -- cgit v1.2.1