Skip to content

Commit

Permalink
Merge pull request #9308 from nextcloud/fix/composer/select-duplicate…
Browse files Browse the repository at this point in the history
…-label

fix(composer): duplicate label in to, cc and bcc selects
  • Loading branch information
GretaD authored Feb 9, 2024
2 parents 019d3de + 5fec0d1 commit 9aaf581
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/components/Composer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1217,16 +1217,10 @@ export default {
this.onNewAddr(addr, this.selectBcc)
},
onNewAddr(addr, list) {
if (list.some((recipient) => recipient.email === addr)) {
if (list.some((recipient) => recipient.email === addr.email)) {
return
}
let res = addr
if (!this.allRecipients.some((recipient) => recipient.email === addr)) {
res = {
...addr,
email: addr.label,
}
}
let res = { ...addr }
this.newRecipients.push(res)
list.push(res)
this.saveDraftDebounced()
Expand Down

0 comments on commit 9aaf581

Please sign in to comment.