Commit 9950dfb0 authored by leiminghuan's avatar leiminghuan

code prettier

parent 4472fd8d
......@@ -29,7 +29,7 @@ function UsersSelect(currentUser, els, options = {}) {
const { handleClick } = options;
const userSelect = this;
$els.each( (i, dropdown) => {
$els.each((i, dropdown) => {
const userSelect = this;
const options = {};
const $dropdown = $(dropdown);
......@@ -488,10 +488,7 @@ function UsersSelect(currentUser, els, options = {}) {
// Automatically close dropdown after assignee is selected
// since CE has no multiple assignees
// EE does not have a max-select
if (
$dropdown.data('maxSelect') &&
getSelected().length === $dropdown.data('maxSelect')
) {
if ($dropdown.data('maxSelect') && getSelected().length === $dropdown.data('maxSelect')) {
// Close the dropdown
$dropdown.dropdown('toggle');
}
......@@ -557,8 +554,7 @@ function UsersSelect(currentUser, els, options = {}) {
});
import(/* webpackChunkName: 'select2' */ 'select2/select2')
.then(() => {
$('.ajax-users-select').each(
(i, select) => {
$('.ajax-users-select').each((i, select) => {
const options = {};
options.skipLdap = $(select).hasClass('skip_ldap');
options.projectId = $(select).data('projectId');
......@@ -613,11 +609,7 @@ function UsersSelect(currentUser, els, options = {}) {
data.results.unshift(anyUser);
}
}
if (
showEmailUser &&
data.results.length === 0 &&
query.term.match(/^[^@]+@[^@]+$/)
) {
if (showEmailUser && data.results.length === 0 && query.term.match(/^[^@]+@[^@]+$/)) {
const trimmed = query.term.trim();
const emailUser = {
name: sprintf(__('Invite "%{trimmed}" by email'), { trimmed }),
......
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