diff options
author | Phil Hughes <me@iamphill.com> | 2016-08-11 13:27:15 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-08-17 19:17:39 +0300 |
commit | 917a51403fd32b58a36ef261ab9235fa3a171599 (patch) | |
tree | 2351d6666ccc3a8c95ba7164f2c329a4ca85ed3a /app/assets/javascripts/labels_select.js | |
parent | 7124e510eb71a441ede7aca02d0f86b9722ea8eb (diff) |
Fixed bug with label filter dropdown not removing the correct label
Diffstat (limited to 'app/assets/javascripts/labels_select.js')
-rw-r--r-- | app/assets/javascripts/labels_select.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/labels_select.js b/app/assets/javascripts/labels_select.js index 985b782aa50..31762d72bc0 100644 --- a/app/assets/javascripts/labels_select.js +++ b/app/assets/javascripts/labels_select.js @@ -250,8 +250,11 @@ } else if (label.title) { BoardsStore.state.filters['label_name'].push(label.title); } else { - var labelIndex = BoardsStore.state.filters['label_name'].indexOf(label.text()); - BoardsStore.state.filters['label_name'].splice(labelIndex, 1); + var filters = BoardsStore.state.filters['label_name']; + filters = filters.filter(function (label) { + return label !== $el.text().trim(); + }); + BoardsStore.state.filters['label_name'] = filters; } BoardsStore.updateFiltersUrl(); |