Fix display of image messages that lack thumbnails

Fixes https://github.com/vector-im/element-web/issues/18175
This commit is contained in:
David Baker 2021-07-22 22:49:30 +01:00
parent 248a758ad6
commit d38f2cf5b5

View file

@ -67,6 +67,7 @@ export class MediaEventHelper implements IDestroyable {
private prepareThumbnailUrl = async () => { private prepareThumbnailUrl = async () => {
if (this.media.isEncrypted) { if (this.media.isEncrypted) {
const blob = await this.thumbnailBlob.value; const blob = await this.thumbnailBlob.value;
if (blob === null) return null;
return URL.createObjectURL(blob); return URL.createObjectURL(blob);
} else { } else {
return this.media.thumbnailHttp; return this.media.thumbnailHttp;