Skip to content

Commit

Permalink
fix #4580 by adding key property to dashboard messages and fix misc e…
Browse files Browse the repository at this point in the history
…rrors for emails with empty from array

Signed-off-by: Patrick Bender <[email protected]>
  • Loading branch information
IchbinkeinReh committed May 22, 2023
1 parent 8f3ea1f commit b0a8291
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
:main-text="itemMainText(item)"
:sub-text="itemSubText(item)">
<template #avatar>
<Avatar v-if="item.from"
<Avatar v-if="item.from && item.from.length"
:email="item.from[0].email"
:display-name="item.from[0].label"
:disable-tooltip="true"
Expand Down Expand Up @@ -128,6 +128,7 @@ export default {
await Promise.all(inboxes.map(async (mailbox) => {
const messages = await fetchEnvelopes(mailbox.accountId, mailbox.databaseId, this.query, undefined, 10)
messages.forEach(message => { message.id = message.databaseId })
this.messages = this.messages !== null ? [...this.messages, ...messages] : messages
this.fetchedAccounts++
}))
Expand All @@ -136,7 +137,7 @@ export default {
},
methods: {
itemMainText(item) {
return item.from ? item.from[0].label : ''
return item.from && item.from.length ? item.from[0].label : ''
},
itemSubText(item) {
return item.subject
Expand Down

0 comments on commit b0a8291

Please sign in to comment.