From 8d10e026dbb3a6bef9366f218c8ede3993c7e31b Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Wed, 28 Nov 2018 14:42:30 -0600 Subject: [PATCH] Fix empty lightbox when there is no avatarUrl Signed-off-by: Aaron Raimist --- src/components/views/avatars/RoomAvatar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/views/avatars/RoomAvatar.js b/src/components/views/avatars/RoomAvatar.js index 7b9cb10d514a..506bd87adc84 100644 --- a/src/components/views/avatars/RoomAvatar.js +++ b/src/components/views/avatars/RoomAvatar.js @@ -137,6 +137,11 @@ module.exports = React.createClass({ const avatarUrl = this.props.room.getAvatarUrl( MatrixClientPeg.get().getHomeserverUrl(), null, null, null, false); + + if (!avatarUrl) { + return; + } + const ImageView = sdk.getComponent("elements.ImageView"); const params = { src: avatarUrl,