From d38f2cf5b59467adf0597efddf51f80cdce9ed21 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 22 Jul 2021 22:49:30 +0100 Subject: [PATCH] Fix display of image messages that lack thumbnails Fixes https://github.com/vector-im/element-web/issues/18175 --- src/utils/MediaEventHelper.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/MediaEventHelper.ts b/src/utils/MediaEventHelper.ts index cf34d5dea4..8b8edcc62a 100644 --- a/src/utils/MediaEventHelper.ts +++ b/src/utils/MediaEventHelper.ts @@ -67,6 +67,7 @@ export class MediaEventHelper implements IDestroyable { private prepareThumbnailUrl = async () => { if (this.media.isEncrypted) { const blob = await this.thumbnailBlob.value; + if (blob === null) return null; return URL.createObjectURL(blob); } else { return this.media.thumbnailHttp;