Commit 8eefe4cd authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Fatih Acet

Remove nested Promise from project select

parent e707d8f1
......@@ -5,9 +5,7 @@ import Api from './api';
import ProjectSelectComboButton from './project_select_combo_button';
import { s__ } from './locale';
export default function projectSelect() {
import(/* webpackChunkName: 'select2' */ 'select2/select2')
.then(() => {
const projectSelect = () => {
$('.ajax-project-select').each(function(i, select) {
var placeholder;
const simpleFilter = $(select).data('simpleFilter') || false;
......@@ -101,6 +99,9 @@ export default function projectSelect() {
if (simpleFilter) return select;
return new ProjectSelectComboButton(select);
});
})
};
export default () =>
import(/* webpackChunkName: 'select2' */ 'select2/select2')
.then(projectSelect)
.catch(() => {});
}
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