mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
dont crash on m.image without url
This commit is contained in:
parent
989a27395e
commit
70e6515b5c
@ -27,12 +27,18 @@ export class ImageTile extends MessageTile {
|
|||||||
|
|
||||||
get thumbnailUrl() {
|
get thumbnailUrl() {
|
||||||
const mxcUrl = this._getContent().url;
|
const mxcUrl = this._getContent().url;
|
||||||
return this._room.mxcUrlThumbnail(mxcUrl, this.thumbnailWidth, this.thumbnailHeight, "scale");
|
if (mxcUrl) {
|
||||||
|
return this._room.mxcUrlThumbnail(mxcUrl, this.thumbnailWidth, this.thumbnailHeight, "scale");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
get url() {
|
get url() {
|
||||||
const mxcUrl = this._getContent().url;
|
const mxcUrl = this._getContent().url;
|
||||||
return this._room.mxcUrl(mxcUrl);
|
if (mxcUrl) {
|
||||||
|
return this._room.mxcUrl(mxcUrl);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
_scaleFactor() {
|
_scaleFactor() {
|
||||||
|
Loading…
Reference in New Issue
Block a user