Skip to content

Commit 7418e4d

Browse files
committed
make sure prop is present
1 parent f774e82 commit 7418e4d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • app/lib/methods/subscriptions

app/lib/methods/subscriptions/room.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,10 @@ export default class RoomSubscription {
265265
message.attachments = message.attachments?.map(att => {
266266
const existing = messageRecord.attachments?.find(
267267
a =>
268-
a.image_url === att.image_url ||
269-
a.video_url === att.video_url ||
270-
a.audio_url === att.audio_url ||
271-
a.thumb_url === att.thumb_url
268+
(a.image_url && a.image_url === att.image_url) ||
269+
(a.video_url && a.video_url === att.video_url) ||
270+
(a.audio_url && a.audio_url === att.audio_url) ||
271+
(a.thumb_url && a.thumb_url === att.thumb_url)
272272
);
273273

274274
return {

0 commit comments

Comments
 (0)