summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/labels_select.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-09-05 17:32:07 +0100
committerPhil Hughes <me@iamphill.com>2016-09-07 09:14:30 +0100
commitf849ef792a620164d1e1e231b58f72f17293e9fc (patch)
treecfcd8b9e00a5c2e3a1394950ab7967da0ee6a242 /app/assets/javascripts/labels_select.js
parent1e042ac251119c5e3b0ef8e76f3a6d9420fba98b (diff)
downloadgitlab-ce-f849ef792a620164d1e1e231b58f72f17293e9fc.tar.gz
Fixed issue board label filtering not removing labels
Closes #21417
Diffstat (limited to 'app/assets/javascripts/labels_select.js')
-rw-r--r--app/assets/javascripts/labels_select.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/labels_select.js b/app/assets/javascripts/labels_select.js
index bab23ff5ac0..5f84e0f1024 100644
--- a/app/assets/javascripts/labels_select.js
+++ b/app/assets/javascripts/labels_select.js
@@ -273,12 +273,12 @@
if (page === 'projects:boards:show') {
if (label.isAny) {
gl.issueBoards.BoardsStore.state.filters['label_name'] = [];
- } else if (label.title) {
+ } else if ($el.hasClass('is-active')) {
gl.issueBoards.BoardsStore.state.filters['label_name'].push(label.title);
} else {
var filters = gl.issueBoards.BoardsStore.state.filters['label_name'];
- filters = filters.filter(function (label) {
- return label !== $el.text().trim();
+ filters = filters.filter(function (filteredLabel) {
+ return filteredLabel !== label.title;
});
gl.issueBoards.BoardsStore.state.filters['label_name'] = filters;
}