diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2018-11-21 16:15:47 +0800 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2018-12-06 09:02:32 +0800 |
commit | 0ec5edd5bed6918e27330da3140cf87a008c06f3 (patch) | |
tree | 38189ad212b9e58d2e5ffc02822b9ef0504414c6 | |
parent | 16afcb5565d261061c28f929a21f69836b1d8f79 (diff) | |
download | gitlab-ce-0ec5edd5bed6918e27330da3140cf87a008c06f3.tar.gz |
Allow adding of duplicate label names in boards
-rw-r--r-- | app/assets/javascripts/boards/models/issue.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/boards/models/issue.js b/app/assets/javascripts/boards/models/issue.js index 5e0f0b07247..dd92d3c8552 100644 --- a/app/assets/javascripts/boards/models/issue.js +++ b/app/assets/javascripts/boards/models/issue.js @@ -55,12 +55,12 @@ class ListIssue { } findLabel(findLabel) { - return this.labels.filter(label => label.title === findLabel.title)[0]; + return this.labels.find(label => label.id === findLabel.id); } removeLabel(removeLabel) { if (removeLabel) { - this.labels = this.labels.filter(label => removeLabel.title !== label.title); + this.labels = this.labels.filter(label => removeLabel.id !== label.id); } } @@ -75,7 +75,7 @@ class ListIssue { } findAssignee(findAssignee) { - return this.assignees.filter(assignee => assignee.id === findAssignee.id)[0]; + return this.assignees.find(assignee => assignee.id === findAssignee.id); } removeAssignee(removeAssignee) { |