Commit e30cd309 authored by Lee Tickett's avatar Lee Tickett Committed by Clement Ho

Remove var from project_select.js

parent 25be0d5d
/* 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);
......
---
title: Remove var from project_select.js
merge_request: 20091
author: Lee Tickett
type: other
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