Merge pull request #6671 from Ocelot-Social-Community/6668-fix-avatar-null-on-add-room-and-room-refetchj

fix(webapp): fix 'm.avatar is null' error message
This commit is contained in:
Wolfgang Huß 2023-08-11 12:12:23 +02:00 committed by GitHub
commit 120b6e69e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -334,7 +334,7 @@ export default {
;[...this.messages, ...Message].forEach((m) => {
if (m.senderId !== this.currentUser.id) m.seen = true
m.date = new Date(m.date).toDateString()
if (!m.avatar.startsWith('/api/')) {
if (!m.avatar?.startsWith('/api/')) {
m.avatar = this.$filters.proxyApiUrl(m.avatar)
}
msgs[m.indexId] = m