diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-24 09:06:04 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-24 09:06:04 +0000 |
commit | bc89882970d6a14b1f72eb9c715fae90b26d066c (patch) | |
tree | f5cb59d5130d7585980eb39437071e07ebc12f87 /app/assets/javascripts/labels_select.js | |
parent | 4a45a787703cb78c6101750cfbdc9f656b934b42 (diff) | |
download | gitlab-ce-bc89882970d6a14b1f72eb9c715fae90b26d066c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/labels_select.js')
-rw-r--r-- | app/assets/javascripts/labels_select.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/assets/javascripts/labels_select.js b/app/assets/javascripts/labels_select.js index b028e9564c9..ca7f6736714 100644 --- a/app/assets/javascripts/labels_select.js +++ b/app/assets/javascripts/labels_select.js @@ -1,4 +1,4 @@ -/* eslint-disable no-useless-return, func-names, no-var, no-underscore-dangle, prefer-arrow-callback, one-var, prefer-template, no-new, consistent-return, no-shadow, no-param-reassign, vars-on-top, no-lonely-if, no-else-return, dot-notation, no-empty */ +/* eslint-disable no-useless-return, func-names, no-var, no-underscore-dangle, one-var, prefer-template, no-new, consistent-return, no-shadow, no-param-reassign, vars-on-top, no-lonely-if, no-else-return, dot-notation, no-empty */ /* global Issuable */ /* global ListLabel */ @@ -24,7 +24,7 @@ export default class LabelsSelect { $els = $('.js-label-select'); } - $els.each(function(i, dropdown) { + $els.each((i, dropdown) => { var $block, $dropdown, $form, @@ -172,9 +172,7 @@ export default class LabelsSelect { $sidebarCollapsedValue.text(labelCount); if (data.labels.length) { - labelTitles = data.labels.map(function(label) { - return label.title; - }); + labelTitles = data.labels.map(label => label.title); if (labelTitles.length > 5) { labelTitles = labelTitles.slice(0, 5); @@ -456,9 +454,7 @@ export default class LabelsSelect { ); } else { var { labels } = boardsStore.detail.issue; - labels = labels.filter(function(selectedLabel) { - return selectedLabel.id !== label.id; - }); + labels = labels.filter(selectedLabel => selectedLabel.id !== label.id); boardsStore.detail.issue.labels = labels; } |